Hey guys, Im wondering, is there an easy way to pass method as callback to another method in C++?
Mostly, Im interested in the way like it could be done in C# with Action delegates, like:
void main()
{
MethodWithCallback(CallbackMethod);
}
public void MethodWithCallback(Action callback)
{
//When all is done, call callback
callback();
}
public void CallbackMethod()
{
}
I guess it would be done with Delegates, but not sure isnt there a simplier way here?
Thanks!