Original Post
I've a tempplated class CDrawRectangle, which has a function pointer to a function of this class:
::*)(int,int,int)' to 'void (__cdecl *)(int,int,int)'
When I change the declaration of DrawPixel to:
void (CDrawRectangle::*m_DrawPixel)(int, int, int);
vc++ says "term does not evaluate to a function" and points to a line where I make an call to DrawPixel. It doesn't complain when I assign the member-function to the function-pointer.
I don't understand why vc++ complains so much ;(, but I hope that my problem is clear and someone can give me some advice
[edited by - Merwin on May 11, 2004 6:03:16 PM]
template<class T>
class CDrawRectangle{
// function pointer to a member-function of this class
void (*DrawPixel)(int, int, int);
// one way to draw a pixel
void DrawPixelQuick(int x, int y, int color);
// another way to draw a pixel
void DrawPixelSlow(int x, int y, int color);
if I try to assign DrawPixel to one of the member function (within another member-function of CDrawRectangle) I get a syntax error:
cannot convert from 'void (__thiscall CDrawRectangle