cppreference.com -> C++ I/O

C++ I/O

The <iostream> library automatically defines a few standard objects:

The <fstream> library allows programmers to do file input and output with the ifstream and ofstream classes.

Some of the behavior of the C++ I/O streams (precision, justification, etc) may be modified by manipulating various flags.

Constructors Constructors
bad() true if an error occurred
clear() clear status flags
close() close a stream
eof() true if at the end-of-file
fail() true if an error occurred
fill() manipulate the default fill character
flags() manipulate 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() create an input stream
peek() check the next input character
precision() manipulate precision
put() write characters
putback() return characters to a stream
rdstate() returns the status of the stream
read() read characters
seekg() perform random access on a stream
seekp() perform random access on a stream
setf() set format flags
sync_with_stdio() synchronize with standard I/O
tellg() read stream pointers
tellp() read stream pointers
unsetf() clear format flags
width() manipulate the field width
write() write characters