• Advertisement
Sign in to follow this  

stringstream to string problems

This topic is 3409 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.
stringstream ss;
string       str;

ss << "Here is some text";
ss >> str;

With this str becomes "Here", how do I put the whole contents in the stream into the string.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement