From 4d98282e2f29508508d7e05a917ae5b320113358 Mon Sep 17 00:00:00 2001 From: Pranav Srinivas Kumar Date: Wed, 1 May 2019 19:55:40 -0400 Subject: [PATCH] Fixed formatting in error message (Issue #9) --- include/argparse.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/argparse.hpp b/include/argparse.hpp index 3754db0..426055f 100644 --- a/include/argparse.hpp +++ b/include/argparse.hpp @@ -623,7 +623,7 @@ class ArgumentParser { auto tArgument = mPositionalArguments[i]; if (tArgument->mValues.size() != tArgument->mNumArgs) { std::cout << "error: " << tArgument->mNames[0] << ": expected " - << tArgument->mNumArgs << (tArgument->mNumArgs == 1 ? "argument. " : " arguments. ") + << tArgument->mNumArgs << (tArgument->mNumArgs == 1 ? " argument. " : " arguments. ") << tArgument->mValues.size() << " provided.\n" << std::endl; print_help(); exit(0); @@ -639,7 +639,7 @@ class ArgumentParser { // If no default value, then there's a problem if (!tArgument->mDefaultValue.has_value()) { std::cout << "error: " << tArgument->mNames[0] << ": expected " - << tArgument->mNumArgs << (tArgument->mNumArgs == 1 ? "argument. " : " arguments. ") + << tArgument->mNumArgs << (tArgument->mNumArgs == 1 ? " argument. " : " arguments. ") << tArgument->mValues.size() << " provided.\n" << std::endl; print_help(); exit(0);