I'm using gflags in c++ for parsing of command line parameters. I would like to have a command line flag that accepts a list of parameters. For example param
in the example below.
./myprog --param 0 1 2 3
How can I access a list of integers associated with this parameter?
gflags not supported array output, its just skipping unknown data, so you can choose:
Choice 1, parse args manually before gFlags,but add param to gflags - for no error parsing, for example:
Choice 2:
Modify your input command line for example to : --param 0,1,2,3
and receive param as string in gFlags, split string by ',' and convert to array of integer.