Boost logo

Boost Users :

From: Merrill Cornish (merrill.cornish_at_[hidden])
Date: 2005-11-20 21:42:04


Will,

I've changed my original

        po::store(parse_command_line(argc, argv, desc), vm);

to

        po::store(po::command_line_parser(argc, argv).
              options(desc).
              positional(pd).
              run(), vm);

where desc is is an options_description and pd is a positional_options_description. This looks like an exact match for

     po::variables_map vm;
     po::store(po::command_line_parser(ac, av).
               options(desc).positional(p).run(), vm);
     po::notify(vm);

which is the example from http://www.boost.org/doc/html/program_options/tutorial.html. However, the code still bombs if I give it a positional parameter or an option it isn't expecting.

Merrill


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net