#include using namespace std; #include using namespace boost::program_options; int main(int argc, char** argv) { int x = 0; options_description desc(""); desc.add_options()("x,x", value(&x)->default_value(2), "x"); variables_map vm; store(parse_command_line(argc, argv, desc), vm); notify(vm); return 0; }