Write output stream to string

I have a stream object std::stringstream , and I want to get what it currently has as std::string . Is it possible? I want it to be displayed on my graphics console.

+4
source share
1 answer

You can use the stringstream::str() method to do this: http://www.cplusplus.com/reference/iostream/stringstream/str/

+5
source

All Articles