I'm having a problem with a function pointer. The function pointer is in a struct and is being set to a function in a derived class(the class name isn't certain).
typedef struct StateManager
void (*render)(void); // FUNCTION POINTER
RenderResources is the predefined struct. Render is the overloaded Render function.
virtual void __cdecl Render(); //FUNCTION DECLARATION
And the error:
RenderResources->render = Render;
I'm guessing I need to change the function pointer declaration to contain ArkTest:: but I don't want to do that because there's no certainty the overloaded function will be ArkTest. However, I'm new to function pointers and I'm probably missing something. Any Ideas?
error C2440: '=' : cannot convert from 'void (__cdecl ArkTest::* )(void)' to 'void (__cdecl *)(void)'