C++ – repeatedly using istringstream

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/

Leave a Comment