Commit 00dc8b3018e6bd80de7f0711d1d164e75569776e

Authored by Taylor Braun-Jones
1 parent aec97a6f

README.md: Fix compile errors in quick start example

Showing 1 changed file with 2 additions and 1 deletions
README.md
@@ -22,13 +22,14 @@ Additionally, anything after `--` will be parsed as a positional argument. @@ -22,13 +22,14 @@ Additionally, anything after `--` will be parsed as a positional argument.
22 22
23 Create a cxxopts::Options instance. 23 Create a cxxopts::Options instance.
24 24
25 - cxxopts::Options options; 25 + cxxopts::Options options("MyProgram", "One line description of MyProgram");
26 26
27 Then use `add_options`. 27 Then use `add_options`.
28 28
29 options.add_options() 29 options.add_options()
30 ("d,debug", "Enable debugging") 30 ("d,debug", "Enable debugging")
31 ("f,file", "File name", cxxopts::value<std::string>()) 31 ("f,file", "File name", cxxopts::value<std::string>())
  32 + ;
32 33
33 Options can be declared with a short and/or long option. A description must be 34 Options can be declared with a short and/or long option. A description must be
34 provided. The third argument is the value, if omitted it is boolean. Any type 35 provided. The third argument is the value, if omitted it is boolean. Any type