Flags are activated by single letters inside an argument or option4. GetPot has two functions to access flags:
... const bool verbose_f = cl.options_contain("vV"); const bool extract_f = cl.argument_contains(1, "xX"); const bool create_f = cl.argument_contains(1, "cC"); if( create_f && extract_f ) { cerr << "cannot create and extract at the same time.\n"; exit(-1); } ...At first, it is checked if any option (argument that starts with a minus) contains a letter 'v' or 'V'. If it does, then the verbose flag will be set. The letters 'x', 'X', 'c', and 'C' in the first argument indicate if one uses the program to extract or create a new file. Correspondingly the flags are set.