[cli-users] unset option

Philipp Eichmann philipp.eichmann at gmail.com
Wed Nov 30 10:21:55 EST 2011


Hi

I have the following definitions in my options file:

std::string -d | --directory  {
    "<text>",
    "bla"
  };

std::string -z  {
    "<text>",
    "blu"
  };

If I launch the application with "./myapp -d -z test" and print option
-d with options.d(), I get the string "-z" as result.
Which is obivously wrong since -d should not be set or empty.

How would I have to handle options for which no values are provided
and other options follow?

Thx!



More information about the cli-users mailing list