$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Christian Henning (chhenning_at_[hidden])
Date: 2007-08-15 13:33:46
Hi there, a while ago I was asking some questions about the short
option feature. If I'm not mistaken a short option can only be one
letter long. Is that correct to say?
In my project I need more than this. So I started to just add the
short names to the options list like I would do for all options. But
in this case they would share the same variable. Like this:
po::options_description settings( "" );
settings.add_options()
( "input_1"
, po::value< string >( &_input )
->default_value( "" )
, "" )
( "i1"
, po::value< string >( &_input )
->default_value( "" )
, "" );
Both options are pointing to the same variable. For some reasons this
code works only for "input_1" and not for "i1". Why is that? If I use
--i1="Hallo" the _input is empty.
Regards,
Christian