Boost logo

Boost Users :

From: David Klein (dave_chp_at_[hidden])
Date: 2007-03-07 11:20:47


Aljaz wrote:
> What am I doing wrong?
> I get error 'boost::program_options::typed_value<T>
> *boost::program_options::value(T *)' : expects 1 arguments - 0 provided
>
> class options {
> public:
> unsigned int _option1;
> int _option2;
>
> void parse_options() {
> boost::program_options::options_description config;
> config.add_options()
> ("set1",
> boost::program_options::value<&_option1>()->default_value(200), "seting 1")
> ("set2",
> boost::program_options::value<&_option2>()->default_value(300), "seting 2");
> }
> };
>
>
>
> Thanks for help
>
>
Hi,

it should be:

boost::program_options::value<unsigned
int>(&_option1)->default_value(200), "seting 1")

--
Regards,
dave

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