17 Aug
2010
17 Aug
'10
9:43 a.m.
Hi! Let's assume we have this: (stolen from tutorial): // Declare the supported options. po::options_description desc("Allowed options"); desc.add_options() ("compression", po::value<int>(), "set compression level") ; po::variables_map vm; po::store(po::parse_command_line(ac, av, desc), vm); po::notify(vm); ... if (vm.count("compression")) { cout << "Compression level was set to " << vm["compression"].as<int>() << ".\n"; } else { cout << "Compression level was not set.\n"; } Is there a way to set a new int to "compression" programmatically like this: vm["compression"].set( 42 ) ? Best regards, Ingo