[LC++]getopt question

Paul M Foster paulf at quillandmouse.com
Mon Nov 18 13:14:01 UTC 2002


I'm using getopt(3) to obtain command line parameters for a program I've
written. One of the parameters is in the form of a date, to wit:

2002-11-17

Apparently, getopt() sees those dashes and interprets them as more
options. It stops and waits for me to type in something. If I take out
this option, the program runs fine. I've tried quoting the string,
double-quoting the string, escaping the dashes with backslashes. Nothing
appears to work. Anyone have any experience with a way to get around
this?

Paul




More information about the tuxCPProgramming mailing list