Possible Duplicate:
Why is FILE all-caps as in FILE*?
Why is the standard library FILE
type written uppercase ?
Is it because of its opaque nature ?
Thank you.
If you look at the naming convention used in C, upper case is typically used for preprocessor macros. My guess is that it originally was implemented as a macro expanding to the concrete type used by the library implementation.
From here
"Strictly speaking, in C the FILE type is a library defined (in stdio.h header) type alias (see typedef keyword). No need to use FILE type as such, only FILE* (pointer to FILE) type. It's (one of;) C language funny idioms. As usually, FILE type alias denotes library defined structure, but don't use its members directly (it's implementation dependent entity)."
Also this:
typedef FILE *stream;
Finally here:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With