From 216530e330faf477ba30993cc336ce23fab5c629 Mon Sep 17 00:00:00 2001 From: Pranav Srinivas Kumar Date: Sun, 31 Mar 2019 17:21:25 -0400 Subject: [PATCH] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index ca5fdf7..0386724 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ argparse::ArgumentParser program("program name"); Argparse supports a variety of argument types including positional arguments, optional arguments, toggle arguments and compound arguments. +### Positional Arguments + Here's an example of a ***positional argument***: ```cpp @@ -48,6 +50,8 @@ Here's what's happening: * The parse_args() method parses the arguments provided, converts our input into an integer and returns the square. * We can get the value stored by the parser for a given argument using ```parser.get(key)``` method. +### Optional Arguments + Now, let's look at ***optional arguments***. Optional arguments start with ```-``` or ```--```, e.g., "--verbose" or "-a". Optional arguments can be placed anywhere in the input sequence.