1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-04-29 20:23:55 +00:00
CLI11/book/code/intro.cpp
Henry Schreiner efb99b97b3
Tutorial book (#318)
* Clean up book merge

* Book building in place
2019-09-06 15:20:16 -04:00

16 lines
303 B
C++

#include "CLI/CLI.hpp"
#include <iostream>
int main(int argc, char **argv) {
CLI::App app{"App description"};
// Define options
int p = 0;
app.add_option("-p", p, "Parameter");
CLI11_PARSE(app, argc, argv);
std::cout << "Parameter value: " << p << std::endl;
return 0;
}