https://github.com/cemoktra/argcpp17
argcpp17 is a command line parser using c++17 features
https://github.com/cemoktra/argcpp17
argparse argument-parser argument-parsing cli cpp17
Last synced: 9 months ago
JSON representation
argcpp17 is a command line parser using c++17 features
- Host: GitHub
- URL: https://github.com/cemoktra/argcpp17
- Owner: cemoktra
- License: lgpl-3.0
- Created: 2019-12-19T14:06:31.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-23T09:18:58.000Z (almost 6 years ago)
- Last Synced: 2025-02-12T14:29:57.687Z (11 months ago)
- Topics: argparse, argument-parser, argument-parsing, cli, cpp17
- Language: C++
- Size: 42 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/cemoktra/argcpp17/actions)
# argcpp17
argcpp17 is a command line parser using c++17 features. It supports sub-commands, flags, mandatory and optional arguments and positional arguments.
A simple hello world application could be:
```cpp
#include
int main(int argc, char **args)
{
parser cmdline;
cmdline.add_flag({"flag1"}, "description")
.add_flag({"flag2", "f2"}, "another description")
.add_option({"option", "o"}, "some double value");
cmdline.parse(argc, args);
cmdline.get_flag({"f2"});
cmdline.get_value({"option"});
}
```