C++ Function pointers with unknown number of arguments
问题 I need some help with C++, please! I'm writing a command parser for a small text-based game, and I've run into some problems. The parser is supposed to read and parse commands entered by the player. The most obvious and straightforward solution to this could be something like this (written in pseudo-code): command <- read input from the player if command == COMMAND1 do command1 else if command == COMMAND 2 do command2 ... I'm writing in C++, so I was thinking I could solve this by using an