Hello,
I have some problems always when I'm trying to work with pointer-to-function. I need to create some that can be called from another class. But maybe I don't know how to make it. This is the code I've written:
Editor[.h]
//...
// UIRWin is the class that I need to call the MTP::Application::Start function from
// MTP::Application is in RenderEngine
UIRWin->mExtVoid = &MTP::Application::Start;
//...
RenderEngine[.h] contains class that have this function:
class Application
{
//...
virtual void Start(bool);
//...
}
UIRWin[.h]:
//...
typedef void (MTP::Application::*pVoid)(bool);
pVoid mExtVoid; // set in Editor
//...
if (mExtVoid)
mExtVoid(true);
So everytime I try to compile this, I get this error:
error C2064: term does not evaluate to a function taking 1 arguments
Please, where I'm wrong? :icon_cry: