代码:
// Copyright Vladimir Prus 2002-2004.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
/* The simplest usage of the library.
*/
#include <boost/program_options.hpp>
namespace po = boost::program_options;
#include <iostream>
#include <iterator>
using namespace std;
int main(int ac, char* av[])
{
try {
po::options_description desc("Allowed options");
desc.add_options()
("help,h", "produce help message")
("compression", po::value<double>(), "set compression level")
("include-path,I", po::value<std::string>(), "set path")
("debugflag,D", po::value<bool>(), "set file")
;
po::variables_map vm;
po::store(po::parse_command_line(a