|
|
|
|
std::map
. You'd use input as a key, and look up for, let's say, an enum saying what command should be called. Keep in mind however, that maps aren't too fast. It will not matter in small projects, but if you find your code too slow - it may be the reason.