LICENSE, copyright, and formatting

This commit is contained in:
Carl Pearson
2022-01-17 13:12:14 -07:00
parent cbd549f737
commit e8d0687f44
11 changed files with 245 additions and 35 deletions

View File

@@ -1,3 +1,5 @@
// copyright Carl Pearson, 2022
#include "argparse/argparse.hpp"
int main(int argc, char **argv) {
@@ -11,12 +13,10 @@ int main(int argc, char **argv) {
std::string maybePrint;
int repeats = 2;
// Inform the parser of the program data. It will do type-specific conversion
// from string.
// Inform the parser of the program data. It will do type-specific conversionfrom string.
// An option invoked with `--repeat N`
p.add_option(repeats, "--repeat")
->help("how many times to repeat first argument");
p.add_option(repeats, "--repeat")->help("how many times to repeat first argument");
// A flag invoked with `--verbose` or `-v`
p.add_flag(verbose, "--verbose", "-v");
// a required positional argument (position 1)