3 C++ library for handling command line arguments, designed to be easily used.
14 You need to enable c++11 support in your compiler. You can achieve that in
15 g++ and clang++ by adding `-std=c++11` compilation flag.
17 As this is header-only library, you don't need any additional steps.
24 #include <command/command.h>
25 #include <command/option.h>
27 using namespace command;
29 int main(int argc, char *argv[]) {
31 Command command(argc, argv, {
32 new Option<void>("-h", "Help", [](void) { std::cout << "Help information\n"; })
35 catch(const std::exception & e) {
42 Now program can be compiled & run using following commands:
44 $ g++ -std=c++11 example.cpp
50 Current documentation can be found at:
51 http://dlugolecki.net.pl/software/command/docs/
53 If for some reason it is unavailable, you can build it yourself. The only
54 requirement is to have [Doxygen](http://www.doxygen.org/) installed when `make` command is invoked.