User Tools

Site Tools


Quick Reference - C++ STL


For some introductory thoughts, see my blog post on the subject.

Key Points

  • Streams are a serial character-based abstract interface to underlying storage of various types.
  • They don't support random access, but may support seeking.
  • Writing is performed with « and reading with » where the stream is always on the LHS.
  • Any class can be made streamable by providing appropriate overloads of these operators.

Header Files

iostream Standard streams: cout, cin, cerr, clog, etc.
fstream File IO: ifstream, ofstream, fstream.
sstream String streams: istringstream, ostringstream, stringstream.
streambuff Low-level buffers on which streams are built, base is streambuff.
quickref/c_stl.txt · Last modified: 2013/05/29 12:37 by andy