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 POINTERRenderResources is the predefined struct. Render is the overloaded Render function.Code:virtual void __cdecl Render(); //FUNCTION DECLARATION
And the error:Code: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?Code:error C2440: '=' : cannot convert from 'void (__cdecl ArkTest::* )(void)' to 'void (__cdecl *)(void)'



LinkBack URL
About LinkBacks


