
27 Oct
2005
27 Oct
'05
10:21 a.m.
Hi Christophe,
| vector<string> to_pass_further = collect_arguments(parsed.option, | include_positional);
I think that's very convenient. A lot of libraries which get initialized with command line options take the usual (int argc, char** argv)
for example., if I understand correctly, with your changes we have int main(int argc,char** argv) { // do the usual program_options stuff // get further(unregistered) options to pass unreg_argc= to_pass_further.size(); char** unreg_argv = transform_to_charstarstar( to_pass_further );
One should take care to pass argv[0] as well, as program_options just ignores it and it's not included in the result of "collect_arguments". Otherwise, yes, this should work. - Volodya