Skip to content

Commit 865fc98

Browse files
author
Jesse
committed
made example make a little more sense
1 parent ff327e9 commit 865fc98

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

example.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ int main(int argc, char* argv[]) {
3131
parser.add_argument("--flag", "a flag");
3232
parser.add_argument("-v", "a vector", true);
3333
parser.add_argument("-l", "--long", "a long argument", false);
34-
parser.add_argument("-o", "input files", false);
34+
parser.add_argument("--files", "input files", false);
3535
try {
3636
parser.parse(argc, argv);
3737
} catch (const ArgumentParser::ArgumentNotFound& ex) {
@@ -51,8 +51,8 @@ int main(int argc, char* argv[]) {
5151
double sum;
5252
for (auto& d : v) sum += d;
5353
std::cout << " sum: " << sum << std::endl;
54-
auto f = parser.getv<std::string>("o");
55-
std::cout << "o: ";
54+
auto f = parser.getv<std::string>("files");
55+
std::cout << "files: ";
5656
std::copy(f.begin(), f.end(),
5757
std::ostream_iterator<std::string>(std::cout, " | "));
5858
std::cout << std::endl;

0 commit comments

Comments
 (0)