
Hi, I'm new to boost (and c++) and I've just started using program_options. Great concept and code, it has saved me a lot of time/effort, thanks. I am having a problem with the ->notify(&your_function) in add_options. I get a compile error (g++ on redhat): "invalid use of void expression". If I comment out the ->notify(&func) part, the code compiles. This is the code: 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)) ; } ...catch code... } Any help/ideas appreciated. I'm hoping it's something simple and my lack of c++ knowledge is showing. I've already simplified the code and tried several modifications, but the compile error persists. thanks, susan. __________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail