In my case, my program has only one final argument like this:
// Parse arugments
ArgumentParser parser;
parser.addFinalArgument("work_dir", 1, true);
parser.parse(argc, argv);
auto work_dir = parser.retrieve<string>("work_dir");
printf("workdir: %s\n", work_dir.c_str());
exit(0);
However, when I input the following commands, the program throws an error.
$ ./MyProgram ./one_directory
ArgumentParser error: attempt to pass too many inputs to
Usage: ./MyProgram WORK_DIR
In my case, my program has only one final argument like this:
However, when I input the following commands, the program throws an error.