Name: Anonymous 2012-04-19 13:05
Hi /prague/
I'm programming in C and writing a little interactive program.
What's the best way to execute a function / piece of code depending on a string ? I could write a bunch of }else if(!strcmp(s, foo)){ but I find this hideous.
Any suggestions ?
I'm programming in C and writing a little interactive program.
What's the best way to execute a function / piece of code depending on a string ? I could write a bunch of }else if(!strcmp(s, foo)){ but I find this hideous.
Any suggestions ?