String Streams

The iostream library supports in-memory input/output, in which a stream is attached to a string within the program's memory. That string can be written to and read from using the iostream input and output operators. The library defines three kinds of string streams:

  • istringstream : derived from istream reads from a string.
  • ostringstream : derived from ostream, writes to a string.
  • stringstream : derived from iostream, reads and writes a string.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.