I want to use default values for some of my command line arguments. How do I tell program_options
what the default option is, and, if the user doesn't supply the argument, how do I tell my program to use the default value?
Say I want to have an argument specifying the number of robots to send on a murderous rampage with a default value of 3.
robotkill --robots 5
would produce 5 robots have begun the silicon revolution
, whereas
robotkill
(no arguments supplied) would produce 3 robots have begun the silicon revolution
.
count
doesn't work, apparently because even when the option is not supplied the variable map will assign the default value, so count is never zero)