first off if there is a better way then what i am suggesting, please feel free to inform me.
I am looking into a menu system to use in C++, I found this page, How to parse command line parameters. - C++ Articles
but upon trying the code within it, under the heading, "More on usage messages" , of course it fails. It too suggests getopts which I have dealt with in C. But I am wondering if their are other options beside that and the "old way" that is always shown in the how to books, on menu creation. An example of that is from in here even.
Help with chapter 6 (functions) practice problem 1
not wanting to create a long list of
orCode:if ( strcmp(argv[i], whatever) { var = whatever; } else if (strcmp(argv[i], whatever) { var = whatever; } else { whatever; }
type statements (inside a loop).Code:if ( var == "string" ) .... else if ( var == "string || var == "string")
Just hoping someone knows a few more options that are not too hard to pick up on to use. of course using the long and short options format 1 hyphen (-) two hyphens (--) setup. or as requested if someone got a better Idea I am open to suggestions.