C++: cannot initialize a parameter of type 'void (*)()' with an rvalue of
type 'void'
I'm using GLUT with C++ and I'm calling a function called glutDisplayFunc
with a single argument of the type void (*)(void). For some reason, when I
use the following C++ method from one of my classes:
void EventHandler::Render(void) { ... }
It throws this error:
cannot initialize a parameter of type 'void (*)()' with an rvalue of type
'void'
Which seems to give me the thought that my C++ method isn't declared to
properly comply with the argument type void (*)(void). What can I do to
make my method work with this function parameter?
Thanks.
No comments:
Post a Comment