c++ - Why can't I use the << operator with the value extracted from this variables_map? -
i'm familiarizing myself boost::program_options
(and c++ in general). wrote function below, can't quite understand error i'm getting. here's code (note po
alias boost::program_options
).
int application(po::variables_map& vm) { std::cout << &vm << std::endl; std::cout << vm["infile"]; return success; }
the error i'm receiving second line in function body. reads: "no match ‘operator<<’ (operand types ‘std::ostream {aka std::basic_ostream<char>}’ , ‘const boost::program_options::variable_value’)"
what doing wrong?
Comments
Post a Comment