warning: converting from `unsigned int (Controller::*)()' to
`unsigned int (*)(unsigned int)'
While this isn’t causing problems I would very much like to eliminate
the warning during compilation. Any comments or suggestions would
be appreciated.
This needs to be a static member function and you need to keep the Controller
object in a global somewhere. This is because Controller::update() takes
a hidden “this” parameter, which is used to dereference any class-local
variables, and is not passed to the timer function.
If you need it, I can have the timer callback get passed a void pointer
which you can cast to a Controller object, and access via a friend function.