I have a code for reading files with float numbers on line stored like this: \"3.34|2.3409|1.0001|...|1.1|\". I would like to read them using istringstream, but it doesn\'t
After setting the row into the istringstream...
separate.str(row);
... reset it by calling
separate.clear();
This clears any iostate flags that are set in the previous iteration or by setting the string. http://www.cplusplus.com/reference/iostream/ios/clear/
You need to add a separate.clear();
line after separate.str(row)
to clear the status bits, otherwise the eofbit
gets set and subsequent reads fail.