Skip to content

Commit

Permalink
Merge pull request #361 from RichardBrown384/rbrown/correct-readme
Browse files Browse the repository at this point in the history
Correct Parent Parser errors in README.md
  • Loading branch information
p-ranav authored May 30, 2024
2 parents 9893754 + 0c44bc3 commit e462ab9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -799,8 +799,8 @@ A parser may use arguments that could be used by other parsers.
These shared arguments can be added to a parser which is then used as a "parent" for parsers which also need those arguments. One or more parent parsers may be added to a parser with `.add_parents`. The positional and optional arguments in each parent is added to the child parser.

```cpp
argparse::ArgumentParser surface_parser("surface", 1.0, argparse::default_arguments::none);
parent_parser.add_argument("--area")
argparse::ArgumentParser surface_parser("surface", "1.0", argparse::default_arguments::none);
surface_parser.add_argument("--area")
.default_value(0)
.scan<'i', int>();

Expand Down

0 comments on commit e462ab9

Please sign in to comment.