I want to pass an array of ints in the following way:
./main --scores 1 49 1 24 4 5 6
I did find a similar question but it's sort of old, hopefully it's changed now. The accepted answer says I should pass them as string with a delimiter.
I want to pass an array of ints in the following way:
./main --scores 1 49 1 24 4 5 6
I did find a similar question but it's sort of old, hopefully it's changed now. The accepted answer says I should pass them as string with a delimiter.
You can't. GFlags doesn't support complex command-line syntax, just simple flags with primitive-typed parameters. You could pass them as a delimited string, but if you really want to go all fancy with your command line usage, you'd probably be better served with a library designed for that, like GNU getopt.