At How to convert a command-line argument to int? it is shown how to assing a comand line argument to an int.
I'm looking for short way. Not using atoi()
.
int size;
istringstream s(argv[1]);
s >> size;
With all the cool C++11/14/17 I still need 3 LOC for that? Or is there a int size = magic(argv[1])
around?