3 ms·
EOF is also used to indicate error(s) in a stream. Its value is platform dependent. As per the C++ standard[0]: It is a macro definition of type int that e
by AdieuToLogic 4y ago
EOF is also used to indicate error(s) in a stream.
Its value is platform dependent. As per the C++ standard[0]:
It is a macro definition of type int that expands into
a negative integral constant expression (generally, -1).
0 - https://cplusplus.com/reference/cstdio/EOF/ https://cplusplus.com/reference/cstdio/EOF/
- lionkor 4y agoplease do not use cplusplus.com, use cppreference instead. cplusplus.com often is wrong, out of date, or just missing things.
- AdieuToLogic 4y agoNoted. Is this particular citation, "wrong, out of date, or just missing things"?
- lionkor 4y agoNone of the above for this case, but generally not a good idea to look there. Instead: https://en.cppreference.com/w/c/io https://en.cppreference.com/w/c/io