How can I call a C++ function from a string?
Instead of doing this, call the method straight from string:
void callfunction(const char* callthis, int []params)
{
if (callthis == "callA"
{
callA();
}
else if (callthis == "callB")
{
callB(params[0], params[1]);
}
else if (callthis == "callC")
{
callC(params[0]);
}
}
In C# we'd use typeof() and then get the method info and call from there... anything we can use in C++? ~ Thanks!