12 May
2005
12 May
'05
5:57 a.m.
Hi Susan,
void Report::PrintName(const string name) { cout << " the log name is " << name << "\n"; }
void Report::InitCmdOpts(void) { try { p_opts = new po::options_description("Reporting"); p_opts->add_options() ("log", po::value< string >() ->default_value("sys.log") ->notify( &Report::PrintName)) ;
In this context the library expects you to pass a function that takes
'string' and returns nothing. However, you pass a member function, which
has implicit 'this' argument. I'd suggest this:
#include