getopt(_long) : How to obtain argument not preceded by '-' or '--'

Posted by Simone Margaritelli on Stack Overflow See other posts from Stack Overflow or by Simone Margaritelli
Published on 2010-04-15T19:50:08Z Indexed on 2010/04/15 19:53 UTC
Read the original article Hit count: 283

Filed under:
|
|

Hi guys, i have a program that needs command line arguments in the form :

./my_program -m256M -tm -t some_other_file

The "some_other_file" argument is not bound to -t (-t it's just another functionality) so i can't take it as the optarg of any of the flags, neither can i assume it is the last argument in the list.

How can i acieve this?

Thanks

© Stack Overflow or respective owner

Related posts about c

    Related posts about getopt-long