MCPcopy Create free account
hub / github.com/CLIUtils/CLI11 / main

Function main

book/code/intro.cpp:4–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include <iostream>
3
4int main(int argc, char **argv) {
5 CLI::App app{"App description"};
6
7 // Define options
8 int p = 0;
9 app.add_option("-p", p, "Parameter");
10
11 CLI11_PARSE(app, argc, argv);
12
13 std::cout << "Parameter value: " << p << std::endl;
14 return 0;
15}

Callers

nothing calls this directly

Calls 1

add_optionMethod · 0.45

Tested by

no test coverage detected