C-style file input/output
C-style file input/output
The C I/O subset of the C++ standard library implements C-style stream input/output operations. The <cstdio>
header provides generic file operation support and supplies functions with narrow and multibyte character input/output capabilities, and the <cwchar>
header provides functions with wide character input/output capabilities.
C streams are objects of type std::FILE
that can only be accessed and manipulated through pointers of type std::FILE*
(Note: while it may be possible to create a local object of type std::FILE
by dereferencing and copying a valid std::FILE*
, using the address of such copy in the I/O functions is undefined behavior). Each C stream is associated with an external physical device (file, standard input stream, printer, serial port, etc).
C streams can be used for both unfor