From 374c70e7b327976892ef75459a522b4a9dc02afc Mon Sep 17 00:00:00 2001 From: Pranav Srinivas Kumar Date: Wed, 1 May 2019 20:13:10 -0400 Subject: [PATCH] Fixes issue #8 --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f288adc..8d355bd2 100644 --- a/README.md +++ b/README.md @@ -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