S
Skavenger
Hi,
I'm attempting to use a class member function pointer to call a
relevant function. This is done like this....
typedef void(SampleA::*SAMPLEAFUNC)(void);
class SampleA {
public:
SampleA() { memFunc = testFunc; }
~SampleB() {};
void testFunc (void);
SAMPLEAFUNC memFunc;
}
void main(void)
{
SampleA *a = new SampleA();
(a->*memFunc)();
}
Unfortunately I get the error C2064: Term does not evealuate to a
function when i try to call using the (a->*memFunc)(); statement.
Anyone got any idea why this is happening?
Thanks in advance.
- Skavenger.
I'm attempting to use a class member function pointer to call a
relevant function. This is done like this....
typedef void(SampleA::*SAMPLEAFUNC)(void);
class SampleA {
public:
SampleA() { memFunc = testFunc; }
~SampleB() {};
void testFunc (void);
SAMPLEAFUNC memFunc;
}
void main(void)
{
SampleA *a = new SampleA();
(a->*memFunc)();
}
Unfortunately I get the error C2064: Term does not evealuate to a
function when i try to call using the (a->*memFunc)(); statement.
Anyone got any idea why this is happening?
Thanks in advance.
- Skavenger.