Hi there!
I'm trying to do something like this without gengetopt()
./app -g filename fileformat
I have to read the option -g, the argument "filename" so I can create a file with that name and then read "fileformat" to know the extension of another file to be generated.
I have no clue of how to do this without gengetopt().
Note that I'm already using gengetopt() so can't use anything that conflicts with it's parsing.
Can anyone give me a hint?
Tks.
Comments
:
: I'm trying to do something like this without gengetopt()
:
: ./app -g filename fileformat
:
: I have to read the option -g, the argument "filename" so I can
: create a file with that name and then read "fileformat" to know the
: extension of another file to be generated.
: I have no clue of how to do this without gengetopt().
: Note that I'm already using gengetopt() so can't use anything that
: conflicts with it's parsing.
:
: Can anyone give me a hint?
:
: Tks.
:
Checkout the discussion on parsing command line arguments in this FAQ. I think it will take care of what you want to do.
http://www.givemefish.com/Downloads/Download_cppFAQ/Download_cppFAQ.php
Matt.
------
nugent