stringstream ss;
string str;
ss << "Here is some text";
ss >> str;
stringstream to string problems
I'm composing a stringstream from various bits of text with spaces between words. Then putting the stream into a string to be used. the problem is when putting the stream into the string it puts every up to the whitespace and stops.
With this str becomes "Here", how do I put the whole contents in the stream into the string.
Quote:Original post by Kambiz
str = ss.str();
more information
Just as a side-note, I find that website to be much less accurate than cppreference.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement