Jump to content

C++ Language/Std/Iostreams/Stringstream

From Wikibooks, open books for an open world

One possible place where the character sequence could go is into a std::stringstream object, which captures the character sequence as a C++ variable. That variable can then be accessed as a read-only string.

Alternatively, a character sequence can be output to the Console by streaming to std::cout.

Alternatively, a character sequence can be streamed out to a file in the filesystem.

Additional information about stringstream (includes interactive examples)