3 C++ library for handling command line arguments, designed to be easily used.
13 You need to enable c++11 support in your compiler. You can achieve that in
14 g++ and clang++ by adding `-std=c++11` compilation flag.
16 As this is header-only library, you don't need any additional steps.
23 #include <command/command.h>
24 #include <command/option.h>
26 using namespace command;
28 int main(int argc, char *argv[]) {
30 Command command(argc, argv, {
31 new Option<void>("-h", "Help", [](void) { std::cout << "Help information\n"; })
34 catch(const std::exception & e) {
41 Now program can be compiled & run using following commands:
43 $ g++ -std=c++11 example.cpp