Skip to content

Printing help

jarro2783 edited this page Oct 20, 2014 · 1 revision

The cxxopts library has the ability to format a help string for the options available to a program. If you have an object like so:

cxxopts::Options options;

then the most basic way to get a help string is simply to write

options.help()

which returns a std::string whose contents is the complete formatted help string.

Clone this wiki locally