Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Short options only in boost::program_options

Tags:

People also ask

What is boost:: program_ options?

Boost C++ Libraries The program_options library allows program developers to obtain program options, that is (name, value) pairs from the user, via conventional methods such as command line and config file.

How do I use Boost program options?

To add options, you use the add_options() function and append all your options, each one surrounded with parenthesis. Here, we declared two options (help and version). They can be set with --help and --version. You can use operator on the description to output all the options of program.


How would one go about specifying short options without their long counterparts in boost?

(",w", po::value<int>(), "Perfrom write with N frames")

generates this

-w [ -- ] arg : Perfrom write with N frames

Any way to specify short options only?