Fixes issue #8

This commit is contained in:
Pranav Srinivas Kumar 2019-05-01 20:13:10 -04:00 committed by GitHub
parent 7c9f83c7e1
commit 374c70e7b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,14 @@ To start parsing command-line arguments, create an ```ArgumentParser```.
argparse::ArgumentParser program("program name");
```
Argparse supports a variety of argument types including positional, optional, and compound arguments.
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```
```cpp
program.add_argument("foo");
program.add_argument("-v", "--verbose"); // parameter packing
```
Argparse supports a variety of argument types including positional, optional, and compound arguments. Below you can see how to configure each of these types:
### Positional Arguments