ok, i was thinking that eventually i would probably need to implement a basic scripting language into my project. Now the question is, can one call a function whose name is in a string of characters without having to do a "if ( 'string' == functionname)"?
the basic almost C style pseudocode for what i am looking at is:
Code:
int callfunction(char* functionname, ...)//function name, and optional list of arguments read in
{
(function*)(functionname)( ...,...);
};
I figure it might be possible with function pointers, but i havent a clue on how to do this.