Mail Archives: djgpp/1997/10/24/19:17:13
Hello, I am doing a bit of coding in djgpp and along the way, I wanted to write some
pixel plotting code using function pointers and templates. The reasons being that
with templates there are about 8 pixel plotting functions (this would almost double
without templates), and I want the user to simply write: Plot_Pixel(x, y, color); in
order to access any of the plotting functions in any mode (the mode setting function
assignes the proper function to Plot_Pixel()). Anyway, this is what I have in the
header.
template<class col>
extern void (*Plot_Pixel)(short x, short y, col color).
And for some reason, DJGPP tells me on this line that 'Plot_Pixel must be a class
member' or something along those lines. Can someone help me pleas.
- Raw text -