I want to know how many strings there are in my variable when I use istringstream
:
string cadena;
int num;
istringstream ss(cadena);
ss >> num;
int n = ss.size(); // This doesn't work
For example if cadena
is: "1 2 3 4"
, when I use istringstream
I want to know how many strings are in ss
(in this case 4).