UPDATE I realize this question's lacking a proper MCVE, it will take me some time to come up with one. I will update it when I have time to come back to this, sorry. I appreciate the answers thus far.
Following this answer regarding static functions:
Declaration (in MyClass
)
void MyClass::func ( void (MyOtherClass::*f)(int) ); //Use of undeclared identifier 'MyOtherClass'
Example of function being passed to func:
void MyOtherClass::print ( int x ) {
printf("%d\n", x);
}
Function call (in MyOtherClass
)
void MyOtherClass::loop(){
func(&MyOtherClass::print);
}
How can one pass a member function as a parameter of a member function of another class?