A
Axel Dahmen
Hi,
I can't get to compile the following:
struct A
{
A(void);
bool fn(void);
bool (A::*pfnc)(void);
};
A::A(void) : pfnc(fn) {}
bool A::fn(void) {return true;}
int _tmain(int argc, _TCHAR* argv[])
{
A a;
(a.*pfnc)(); // *** error: 'pfnc': undeclared identifier ***
return 0;
}
Is it me?? This ought to be correct C++ syntax. What am I doing wrong?
TIA,
Axel Dahmen
I can't get to compile the following:
struct A
{
A(void);
bool fn(void);
bool (A::*pfnc)(void);
};
A::A(void) : pfnc(fn) {}
bool A::fn(void) {return true;}
int _tmain(int argc, _TCHAR* argv[])
{
A a;
(a.*pfnc)(); // *** error: 'pfnc': undeclared identifier ***
return 0;
}
Is it me?? This ought to be correct C++ syntax. What am I doing wrong?
TIA,
Axel Dahmen