
Patrick B. answered 06/17/19
Math and computer tutor/teacher
You go to the file folder where the *.exe file lives using the change directory command...
> cd pathname
You can issue directory command to make sure it is there
> dir
Once found, you do
>ProgramName clpArg1 clpArg2 clpaArg3 ....
where clpArgx is any one of the command line parameter argument
For example, imagine an OLD word processor , whose executable filename is
wordproc.exe
Then the command
prompt:> wordproc filename.doc
will start the word processor, read the document and render it in the editor.
At that point, there are TWO copies of the document... 1 in the editor and the
other on the disk
===================================================
now on the source code side:
argc is the argument count, which is the number of arguments specified on the command line INCLUDING the program name.
argv is the array of string tokens given on the command line.
So for example:
prompt:> myprog one two three
argc=4
argv[0] = "myprog.exe"
argv[1] = "one"
argv[2]="two"
argv[3] = "three"