User calling functions in the program

I'm making a program to solve graph theory problems and I have certain functions such as addVertex(graph *g, bool directed). I want the user to be able to call the same function with the same parameters. So they would type in, addVertex(g, true), and it would call the function in the program with the corresponding parameters. I originally was just going to do some string parsing using substr() but it gets complex with different parameters in the functions... Is there a better way to do this?
You can parse it using stringstreams or some external regular expression library
Topic archived. No new replies allowed.