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.