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
Alternative: You could use array of function pointers and call the desired function using its index.
typedef void (*TFunc)(int, int); TFunc arrptr[100]; void callFunction(int index, int params[]) { (*arrptr[index])(params[0], params[1]); }