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).
Code:
typedef struct StateManager
{
D3DRENDERSTATETYPE RenderState[10];
DWORD Value[10];
void (*render)(void); // FUNCTION POINTER
Code:
virtual void __cdecl Render(); //FUNCTION DECLARATION
RenderResources is the predefined struct. Render is the overloaded Render function.
Code:
RenderResources->render = Render;
And the error:
Code:
error C2440: '=' : cannot convert from 'void (__cdecl ArkTest::* )(void)' to 'void (__cdecl *)(void)'
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?