diff --git a/examples/test8.cpp b/examples/test8.cpp index 568fd54..6063e02 100644 --- a/examples/test8.cpp +++ b/examples/test8.cpp @@ -37,7 +37,7 @@ void parseOptions(int argc, char** argv) // Define arguments // - SwitchArg btest("B","existTestB", "exist Test B", false, cmd ); + SwitchArg btest("B","existTestB", "exist Test B", cmd, false); ValueArg stest("s", "stringTest", "string test", true, "homer", "string", cmd ); diff --git a/include/tclap/SwitchArg.h b/include/tclap/SwitchArg.h index e69688f..eca1650 100644 --- a/include/tclap/SwitchArg.h +++ b/include/tclap/SwitchArg.h @@ -62,7 +62,7 @@ class SwitchArg : public Arg SwitchArg(const std::string& flag, const std::string& name, const std::string& desc, - bool def, + bool def = false, Visitor* v = NULL); @@ -82,8 +82,8 @@ class SwitchArg : public Arg SwitchArg(const std::string& flag, const std::string& name, const std::string& desc, - bool def, CmdLineInterface& parser, + bool def = false, Visitor* v = NULL); @@ -125,8 +125,8 @@ inline SwitchArg::SwitchArg(const std::string& flag, inline SwitchArg::SwitchArg(const std::string& flag, const std::string& name, const std::string& desc, - bool _default, CmdLineInterface& parser, + bool _default, Visitor* v ) : Arg(flag, name, desc, false, false, v), _value( _default )