i want to have a pointer to a function, so i have the following:
class MyClass()
{
class MyMod()
{
typedef void(*PointFn)();
PointFunc myfunction;
};
void Init(MyMod::PointFn afunction);
}
...
void MyClass::MyMod::Init(MyMod::PointFn afunction)
{
// do stuff
}
// now this calls the Init function:
// assume i have a StandAloneBig() and a AnotherClass::Big() defined...
void StandAloneBig()
{
// not in class
}
void AnotherClass::Big()
{
// funcyion in class
}
// from within AnotherClass class, i call:
CMyClass.Init(&Big); // doesnt work
// but:
CMyClass.Init(&StandAloneBig); // does work
any ideas how i can get the pointer to the AnotherClass::Big function?
error i get is:
error C2664: 'MyClass::MyMod::Init' : cannot convert parameter 2 from 'void(__thiscall AnotherClass::* )(void)' to 'MyClass::MyMod::Init'