I have a pointer to an object 'eventHandler' which has a member function 'HandleButtonEvents':
I call it like this:
eventHandler->HandleButtonEvents();
Now I want to pass a pointer to the member-function 'HandleButtonEvents()' of the class 'EventHandler' as an argument to another the object 'obj' like in this Stackoverflow example:
ClassXY obj = ClassXY(eventHandler->HandleButtonEvents);
The constructor is declared like this:
ClassXY(void(*f)(void));
The compiler tells me:
error : invalid use of non-static member function
What am I doing wrong?