Newsgroups: comp.os.msdos.djgpp From: wolfman AT cedar DOT alberni DOT net Subject: template function pointers Message-ID: Date: Fri, 24 Oct 1997 04:24:12 GMT Lines: 16 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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 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.