I checked the site just now and there's this small piece of pseudo-code "# FOR ACCEPTING MORE THAN ONE ARGUMENT". It's not a very good idea. What if you want to accept three arguments? How much code are you going to write if you want (ever) to accept more? What you want is a loop to go through the argv array, one element at a time. Something like: ---%<--->%--- int main (int argc, char **argv) { for (int i = 1; i < argc; i++) { // For each argument ... if (argv[i][0] == '-') { // Only if it's an option (starts with -) switch (argv[i][1]) { // Check char after "-". case 'c': cout << "Option c!" << endl; if (argc > i + 1) { cout << "Argument: " << argv[i + 1] << endl; i++; } else { cout << "Expected argument. Found none." << endl; } break; case 'e': cout << "Option e!" << endl; cout << "No argument needed!" << endl; break; default: cout << "Unknown argument: " << argv[i][1] << endl; break; } } else { cout << "Extra arg: " << argv[i] << endl; } } return (0); } ---%<--->%--- Try it with inputs: (program assumed to be called "test_argv"): ./test_argv ./test_argv abc ./test_argv -c ./test_argv -f ./test_argv -c abc ./test_argv -c abc -e ./test_argv -c abc -e -f def > -John Arvind /* added by John - Wyatt's comments on similar stuff */ char *_SwitchStatementSavedString; //So long as not to ever be used as a normal variable name by you or another person #define SWITCH(x) _SwitchStatementSavedString=x; for (;;) #define CASE(x) if (strcmp(_SwitchStatementSavedString, x)==0) Then you use it as follows: SWITCH(argv[1]) { CASE("-c") { //Do stuff for this arg break; } CASE("-a") { //Do something else break; } }