O'Reilly logo

Just Enough C/C++ Programming by Guy W. Lecky-Thompson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Recap

Command-line processing is an easy way to provide a program with the possibility to perform tasks non-interactively or for an interactive program to be started in a given mode. It is also very helpful for use with daemons and programs for use in the back office part of a Web solution.

The Debug flag example can be used with many other flags, and the sample code for the GetParameterValue function is flexible enough to allow quite rich command-line parameter-list processing. In cases where certain parameters are mandatory, or in the event that the users place a -? on the command line, it is customary to display a usage screen, complete with all the various flags and options that can be supplied.

This can be enriched by treating the -? option ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required