Skip to content

Commit 374c70e

Browse files
authored
Fixes issue #8
1 parent 7c9f83c commit 374c70e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@ To start parsing command-line arguments, create an ```ArgumentParser```.
2222
argparse::ArgumentParser program("program name");
2323
```
2424
25-
Argparse supports a variety of argument types including positional, optional, and compound arguments.
25+
To add a new argument, simply call ```.add_argument(...)```. You can provide a variadic list of argument names that you want to group together, e.g., ```-v``` and ```--verbose```
26+
27+
```cpp
28+
program.add_argument("foo");
29+
program.add_argument("-v", "--verbose"); // parameter packing
30+
```
31+
32+
Argparse supports a variety of argument types including positional, optional, and compound arguments. Below you can see how to configure each of these types:
2633

2734
### Positional Arguments
2835

0 commit comments

Comments
 (0)