std::string s = "65//3";
std::istringstream indexBlock(s);
for (int i = 0; i < 2; i++) {
int index = 0;
indexBlock >> index;
std::cout << index << std::endl;
}
I would expect the output of the cout to be:
output:
65
3
as I thought the stream iterates through the ints when passing it through '>>'. However the actual output is:
output:
65
0
Can someone please explain what is happening and how I might go about changing it to get the desired result.
Thank you.