Jump to content
  • Advertisement
Sign in to follow this  

stringstream to string problems

This topic is 3550 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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!