c++ - boost::program_options: how to get the application name? -


using boost program options, how string equivalent of argv[0]?

i don't think possible. may because program name legally used option name.

the command line parser code explicitly skips relevant argv member:

template<class chart> basic_command_line_parser<chart>:: basic_command_line_parser(int argc, chart* argv[]) : detail::cmdline(     // explicit template arguments required gcc 3.3.1      // (at least mingw version), , no harm on other compilers.     to_internal(detail::make_vector<chart, chart**>(argv+1, argv+argc+!argc))) {} 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -