K
Keith Krieger
Anyone use Arguments.cpp or Arguments.h you can find them on google.com if
not.
They work fine for Linux and compile in windows. I can check to see if the
argument was passed in and it does however if I pass in an argument it gets
the default no matter what I pass in!?!
If you look closely at the Arguments.h where the line
bool ret = convert(d_arguments[index].second.first, value);
if (!ret)
value = default_value;
return ret;
I know it works to this point cause d_arguments[index].second.first is the
value I want to be placed in value. Value is passed in as a string.
Here's a snip of code for calling the A.get and A.has. A.get doesn't work
and A.has does. So go figure.
A.get ("--canfile", tmpstring, "default.can");
strcpy (canister_file_name, tmpstring.c_str ();
and
help = A.has ("--help|-h");
Any help is apreciated.
not.
They work fine for Linux and compile in windows. I can check to see if the
argument was passed in and it does however if I pass in an argument it gets
the default no matter what I pass in!?!
If you look closely at the Arguments.h where the line
bool ret = convert(d_arguments[index].second.first, value);
if (!ret)
value = default_value;
return ret;
I know it works to this point cause d_arguments[index].second.first is the
value I want to be placed in value. Value is passed in as a string.
Here's a snip of code for calling the A.get and A.has. A.get doesn't work
and A.has does. So go figure.
A.get ("--canfile", tmpstring, "default.can");
strcpy (canister_file_name, tmpstring.c_str ();
and
help = A.has ("--help|-h");
Any help is apreciated.