my code looks like this:
class A
{
void (*action)();
public: void setAction(void function()) {action = function;}
void activate() {(*action)();}
};
class B : A
{
private: void functionIwantToPass() {...}
public: B()
{ setAction(&B::functionIwantToPass); }
};
It gives me this:
error C2664: 'A::setAction' : cannot convert parameter 1 from 'void (__thiscall B::* )(void)' to 'void (__cdecl *)(void)'
How should I put it or modify it?