help with arguments

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,228
Latest member
MikeMichal

Latest Threads

Top