Created
October 19, 2021 22:22
-
-
Save mostsignificant/4dbff3a71d85171f87d5f1285f49265e to your computer and use it in GitHub Desktop.
blog-cxxopts-example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cxxopts.hpp> | |
// ... | |
cxxopts::Options options("MyProgram", "One line description of MyProgram"); | |
options.add_options() | |
("d,debug", "Enable debugging") // a bool parameter | |
("i,integer", "Int param", cxxopts::value<int>()) | |
("f,file", "File name", cxxopts::value<std::string>()) | |
("v,verbose", "Verbose output", cxxopts::value<bool>()->default_value("false")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment