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/
More Related Contents:
- What is the most efficient C++ method to split a string based on a particular delimiter similar to split method in python? [closed]
- how to split a string for equation
- How do I iterate over the words of a string?
- How do I tokenize a string in C++?
- Split a string using C++11
- How to make my split work only on one real line and be capable to skip quoted parts of string?
- What’s the difference between istringstream, ostringstream and stringstream? / Why not use stringstream in every case?
- how to change to c code while using for loop and array
- What is the difference between palindrome permutation and permutation? [closed]
- Easiest way to split a string on newlines in .NET?
- C++ Convert string (or char*) to wstring (or wchar_t*)
- What are the mechanics of short string optimization in libc++?
- Remove spaces from std::string in C++
- Why should one not derive from c++ std string class?
- How do I convert a double into a string in C++?
- Fastest way to get IPv4 address from string
- How I can print the wchar_t values to console?
- How can I get double quotes into a string literal?
- C++ string to enum
- How to read cin with whitespace up until a newline character?
- C++ string::find complexity
- How to use string.substr() function?
- Is it reasonable to use std::basic_string as a contiguous buffer when targeting C++03?
- Split string by single spaces [duplicate]
- How do I convert from LPCTSTR to std::string?
- Should I return std::strings?
- How concatenate a string and a const char?
- Directly write into char* buffer of std::string
- splitting a string based on multiple char delimiters
- Assign a string literal to a char* [duplicate]