Hi Vladimir, I'm a bit confused. Why does the following short option
name not work:
#include
using namespace std;
using namespace boost;
namespace po = boost::program_options;
int main( int argc, char* argv[] )
{
string input;
po::options_description settings( "" );
settings.add_options()
( "input_1,I1"
, po::value< string >( &input )
->default_value( "" )
, "" );
po::options_description options;
options.add( settings );
po::variables_map variables;
store( parse_command_line( argc
, argv
, settings )
, variables );
notify( variables );
cout << input << endl;
return 0;
}
-I1"hello" wont work? In my project I have two input files. The long
names are input_1 and input_2. It seems to me I cannot have numbers in
the short version like: -I1"hello" -I2"world".
Any ideas?
Christian