I have a function in an external library that I cannot change with the following signature:
void registerResizeCallback(void (*)(int, int))
I want to pass in a member function as the callback, as my callback needs to modify instance variables.
Obviously this isn’t possible with a simple:
registerResizeCallback(&Window::Resize);
so I’m not really sure how to solve the problem.
Check "[33.2] How do I pass a pointer-to-member-function to a signal handler, X event callback, system call that starts a thread/task, etc?" at the C++ FAQ Lite: