What's the difference between istringstream, ostringstream and stringstream? / Why not use stringstream in every case?
When would I use std::istringstream , std::ostringstream and std::stringstream and why shouldn't I just use std::stringstream in every scenario (are there any runtime performance issues?). Lastly, is there anything bad about this (instead of using a stream at all): std::string stHehe("Hello "); stHehe += "stackoverflow.com"; stHehe += "!"; CB Bailey Personally, I find it very rare that I want to perform streaming into and out of the same string stream. Usually I want to either initialize a stream from a string and then parse it; or stream things to a string stream and then extract the result