Replies: 1 comment 2 replies
-
std::vector<std::string> files
app.add_option("files",files,"file to use")->check(CLI::ExistingFile)
/// all other options this adds a positional option and puts all positional arguments in a vector |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This will probably be trivial to answer, but I just can't figure it out. How can I parse filename or directory arguments without them being 'options'? Basically I would like to invoke my executable like this:
./my_app -x -y --some-other-option input-a.txt input-b.txt
Instead of this:
./my_app -x -y --some-other-option --file input-a.txt --file input-b.txt
I guess it has something to do with positional arguments, but I can't figure out how to use them. Any pointers would be appreciated.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions