I used this library for some Windows console programs and it worked great. I made the following changes to sidestep signed/unsigned comparison warnings:
CmdLine.cpp, line 102:
<< for (int i = 0; i < args.size(); i++)
>> for (int i = 0; (unsigned int)i < args.size(); i++)
SwitchArg.cpp, line 56:
<< for ( int i = 1; i < combinedSwitches.length(); i++ )
>> for ( int i = 1; (unsigned int)i < combinedSwitches.length(); i++ )
MultiArg.h, line 93:
<< if ( *i < args.size() )
>> if ( (unsigned int)*i < args.size() )
ValueArg.h, line 187:
<< if (*i < args.size() )
>> if ((unsigned int)*i < args.size() )
I highly recommend this library. It's clean, easy to use, and well documented. Kudos to Mr. Smoot.
I agree with your assessment of this library... I haven't done a ton with it yet, but the API is clean and easy to understand ("minimal and complete," in Scott Meyer's terms), and I was able to quickly add a command line option to my console app in a matter of seconds.
BTW, I compiled against Visual C++ 6.0 SP5, and the only change I had to make was with regards to VC 6's non-standard for loop scoping; i.e. an "int i" declared in one for loop is not local to that loop like standard indicates it should be. Other than that, it compiled flawlessly.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.