arg
1.2
a C++ command-line parser
|
This C++ library faciliates the processing of command-line arguments through an arg::Parser
object. After creation, the parser is informed of options that it will parse for and their disposition. The argc
and argv
from the signature of main
function are then passed to the parser to activate the magic.
In brief, to use the arg parser, you need to:
arg.hh
in your program;arg::Parser
);An example of simple programs using the arg parser as follows.
This allows you to pass, on command line, an integer to the variable n
in the program. The above is included as arg_ex0.cc in the examples.
Please see https://ccdw.org/~cjj/prog/arg/ for more information.