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 io stream format flags.

Display all entries for C++ I/O on one page, or view entries individually:

I/O Constructorsconstructors
badtrue if an error occurred
clearclear and set status flags
closeclose a stream
eoftrue if at the end-of-file
failtrue if an error occurred
fillmanipulate the default fill character
flagsaccess or manipulate io stream format flags
flushempty the buffer
gcountnumber of characters read during last input
getread characters
getlineread a line of characters
goodtrue if no errors have occurred
ignoreread and discard characters
opencreate an input stream
peekcheck the next input character
precisionmanipulate the precision of a stream
putwrite characters
putbackreturn characters to a stream
rdstatereturns the state flags of the stream
readread data into a buffer
seekgperform random access on an input stream
seekpperform random access on output streams
setfset format flags
sync_with_stdiosynchronize with standard I/O
tellgread input stream pointers
tellpread output stream pointers
unsetfclear io stream format flags
widthaccess and manipulate the minimum field width
writewrite characters