13 Jul
2007
13 Jul
'07
3:10 p.m.
zh wrote:
Greetings.
po::options_description hidden("Hidden options"); hidden.add_options() ("opt4", po::value<string>(), "opt4") ; ...... po::variables_map vm; po::store(po::command_line_parser(argc, argv).options(all_options).positional(pos).run(), vm); po::notify(vm);
Now I want to replace char* argv[] with wchar_t* in order to pass a Unicode file name to a Win32 SDK function CreateFile(). What would be, in your opinion, an appropriate course of action? I thank you in advance.
1. Replace char* argv[] with wchar_t *arv[]. (And modify whatever IDE/compiler settings are necessary to enable wchar_t main). 2. Use 'wstring' as the type of your options, not 'string'. Then, everything is supposed to work. - Volodya