The real answer to your question is this:
extern "C" {
void function1 ();
void function2 ();
void function3 ();
}
int main (int argv, char * argv [])
{
char * myString = new char [100];
...
myString = "function1"; //user input
void (*f)() = dlsym(RTLD_NEXT, myString);
f();
}
You can obtain the function defined in your binary (by its name, if it was declared with extern "C"), and call it.
On windows, it becomes uglier, but still possible - read on GetProcAddress