Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Help a newbie!

Hi,

I am bit of a newbie, but I am hoping to write a graphics demo in Dev-C++. I have written a method to implement Bresehams line drawing algorithm, but I have a problem when I call a method I have written called SetPixel....


// Sets the given pixel in the image buffer
void RasterAlgorithm::SetPixel( int X, int Y, int winWidth, unsigned char Colour )
{
imageBuffer[ Y*winWidth + X ] = Colour;
}

However, I do not know how to define imageBuffer ... I have seen examples that define it as (unsigned char far*) imageBuffer = (unsigned char far*) 0XA00000000L;

This does not work as Dev-C++ does not allow me to use the keyword "far" for far pointer, so how do I define the imageBuffer? HELP!


Sign In or Register to comment.