mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-04 15:14:39 +00:00
Update README.md
This commit is contained in:
parent
f3e65f69a9
commit
06649254b3
@ -30,6 +30,8 @@ To start parsing command-line arguments, create an ```ArgumentParser```.
|
|||||||
argparse::ArgumentParser program("program name");
|
argparse::ArgumentParser program("program name");
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**NOTE:** There is an optional second argument to the `ArgumentParser` which is the program version. Example: `argparse::ArgumentParser program("libfoo", "1.9.0");`
|
||||||
|
|
||||||
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```
|
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
|
```cpp
|
||||||
|
Loading…
Reference in New Issue
Block a user