Normally I call this function like this
void MouseButton(int button, int state, int x, int y);
...
glutMouseFunc(MouseButton);
But now I would like to pass a member function instead of a "real" (non-member? whats the word for this?) function.
class Plot
{
void Plot::MouseButton(int button, int state, int x, int y);
...
Plot() { glutMouseFunc(MouseButton); }
}
But I get this error:
/home/dave/Plot/src/Plot.h:81: error: argument of type 'void (Plot::)(int, int, int, int)' does not match 'void (*)(int, int, int, int)'
What do I have to do differently to get this to work?
Thanks!
Dave