I'm trying to create some type of callback system for events. I have a function where I'm attempting to set a member to a pointer to a function but I'm receiving an error. This is what I attempted to do:
void (MyClass::*test)() = &MyClass::TestCallback;
EnterButton->SetCallback(test);
And then in the class declaration for "MyClass" I put this:
void SetCallback(void (MyClass::*callback)());
But I'm getting this error: error: expected ')' before '::' token|
anyone have any ideas?