Is it possible to use Input to call a member function?
void one()
{
}
cout << "enter input:" << endl;
cin >> input; //where input is "one"
instance.input()
Is it possible to use Input to call a member function?
void one()
{
}
cout << "enter input:" << endl;
cin >> input; //where input is "one"
instance.input()
If all of your methods have the same number of arguments (or preferably, no arguments), then you can easily do this using an std::map.
Use the method name as key of the map, use a pointer to the method as value in the map. Then lookup the entered string in the map, and execute its corresponding method via the method pointer.
Be careful with non-static methods. Function pointers and pointers to static methods are quite easy, but non-static method pointers are a bit more difficult. See http://www.goingware.com/tips/member-pointers.html for more information.