Retrieve the list of command-line arguments given to the program. For programs that only print the arguments when run directly, see Scripted main.
See also Program name.
For parsing command line arguments intelligently, see Parsing command-line arguments.
Example command line:
myprogram -c "alpha beta" -h "gamma"
Command line arguments are passed the same way as in C.
This example uses iostream. Traditional C I/O also works.
Content is available under GNU Free Documentation License 1.2.