What exactly is the FILE structure that we use for fopen? How does it work exactly?
1 Answer
According to cplusplus.com:
Object containing information to control a stream
[
FILE
is an] object type that identifies a stream and contains the information needed to control it, including a pointer to its buffer, its position indicator and all its state indicators.
FILE
objects are usually created by a call to eitherfopen
ortmpfile
, which both return a pointer to one of these objects.The content of a
FILE
object is not meant to be accessed from outside the functions of the<cstdio>
and<cwchar>
headers;
If you want to learn more about it, you can go to cplusplus.com or cppreference.com.