|
Boost Users : |
Subject: Re: [Boost-users] [program_options] Using multitokens
From: daniel (dnettels_at_[hidden])
Date: 2008-11-07 12:22:28
Ryan McConnehey wrote:
> Shouldn't multitoken read tokens until the next option is found?
>
> Ryan
That was my hope, too. Because I have not found a solution yet I gave up
with multitoken. Know I define:
("modelparams", po::value<string>(), "some modelparams")
and in the command line I write
--modelparams "0.7 1.2 33.0" --otheroption
then I parse the resulting string by hand:
double param[3];
istringstream is(vm["modelparams"].as<string>());
for(int i=0;i<3;i++){
is>>param[i];
}
Daniel
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