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!


Comments

  • Justin BibJustin Bib USAMember Posts: 0

    ________ ( http://forcoder.org ) free video tutorials and ebooks about ( C# Scratch Ruby Java PHP Swift JavaScript Python Assembly R Visual Basic C MATLAB Go Objective-C Perl C++ PL/SQL Visual Basic .NET Delphi LabVIEW Lua VBScript SAS Transact-SQL Fortran Rust Awk F# Ada Apex Crystal Scheme ABAP Julia Erlang Kotlin Lisp Alice Logo Scala ML Bash COBOL FoxPro D Hack Prolog Clojure Dart )

Sign In or Register to comment.