Works great in Windows (VS .NET 2003 C++)

  • Bryan Ressler

    Bryan Ressler - 2003-12-21

    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.

    • ScoPi

      ScoPi - 2004-04-15

      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.

      Good job!


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks