Merge pull request #22 from nocnokneo/patch-1

README.md: Fix compile errors in quick start example
This commit is contained in:
jarro2783 2016-05-13 15:19:39 +10:00
commit 652cbdbfa1

View File

@ -22,13 +22,14 @@ Additionally, anything after `--` will be parsed as a positional argument.
Create a cxxopts::Options instance. Create a cxxopts::Options instance.
cxxopts::Options options; cxxopts::Options options("MyProgram", "One line description of MyProgram");
Then use `add_options`. Then use `add_options`.
options.add_options() options.add_options()
("d,debug", "Enable debugging") ("d,debug", "Enable debugging")
("f,file", "File name", cxxopts::value<std::string>()) ("f,file", "File name", cxxopts::value<std::string>())
;
Options can be declared with a short and/or long option. A description must be Options can be declared with a short and/or long option. A description must be
provided. The third argument is the value, if omitted it is boolean. Any type provided. The third argument is the value, if omitted it is boolean. Any type