Thanks for that, however argc is still taking a value of 2 when there should be 4??
I've found now that if i change string input="in"
and pass ./program -v in test1.cmd
to the command line it works fine however the spec for my assignment requires the < before the filename?
I'm using cygwin so im not sure if my issue is specific to that or if < has some special meaning as this and anything beyond it is not being read into argv.
Symbols < and > has special meaning in the command line. Symbol < means that the standard input stream will be read from a file with the name following <. Symbol > means that standard output stream will be redirected in a file with the name following >. So the command line processor processes this symbol before passing the command line parameters to a calling program.