<iostream> ライブラリはいくつかの標準オブジェクトを自動的に定義します:
<fstream> ライブラリはファイル入力とファイル出力をそれぞれ ifstream クラスと ofstream クラスによって可能にします。 C++では stringstream によっても文字列の入出力が可能になります。
C++ I/O ストリームのいくつかの挙動(精度、行端揃えなど)は様々な I/O ストリームフォーマットフラグ を操作することにより変更できます。
| I/O Constructors | constructors |
| bad | true if an error occurred |
| clear | clear and set status flags |
| close | close a stream |
| eof | true if at the end-of-file |
| exceptions | set the stream to throw exceptions on errors |
| fail | true if an error occurred |
| fill | manipulate the default fill character |
| flags | access or manipulate io_stream_format_flags |
| flush | empty the buffer |
| gcount | number of characters read during last input |
| get | read characters |
| getline | read a line of characters |
| good | true if no errors have occurred |
| ignore | read and discard characters |
| open | open a new stream |
| peek | check the next input character |
| precision | manipulate the precision of a stream |
| put | write characters |
| putback | return characters to a stream |
| rdstate | returns the state flags of the stream |
| read | read data into a buffer |
| seekg | perform random access on an input stream |
| seekp | perform random access on output streams |
| setf | set format flags |
| sync_with_stdio | synchronize with standard I/O |
| tellg | read input stream pointers |
| tellp | read output stream pointers |
| unsetf | clear io_stream_format_flags |
| width | access and manipulate the minimum field width |
| write | write characters |