So heres the situation.
I have a member function pointer
void (EventListener::*_TriggerFunction)(EVENT evnt, int senderID)
Nothing fancy.
The problem is, normally you would simply call it like so
this->*_TriggerFunction(....)
but this does not work in a static member function. You get a "non-static member reference" error.
static void Blah(void* obj)
{
EventListener* listener = static_cast<EventListener*>(obj)
listener->*_TriggerFunction(.....); //Produces error.
}
One solution is to make another member function that is non static, that you call, which inturn calls _TriggerFunction,
but that seems messy and not correct.
Sorry I am not on my regular computer, otherwise I would post some actual code, but I hope this explains my situation!
Thanks!






