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

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -