I want to parse a semicolon seperated string into integers. I used stringstream, it parses the first string but it fails while parsing the second one.
Here is the code:
After line 10 ( buf >> i ) buf is empty, thus not in a good state any more.
To reset the stream state to good, you need to call buf.clear() before line 15