README.md: Fix compile errors in quick start example
This commit is contained in:
parent
aec97a6f53
commit
00dc8b3018
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user