Command Line Arguments

argc is the number of arguments on the command line including the program name; argument count

 

argv contains the actual arguments; argument value

 

argv[0] contains the name of the program, argv[1] is the first argument, and so on.

Compile & run:

example.exe
one
two
three

Leave a Reply