From the C standard (I couldn't find it in the C++ standard)...
Today 01:04 PM
Frobozz ,
OK wise guy! :p
Did you read the link above? EOF is a macro which holds a value representing a "state", or a "status condition", indicating if the end of a file has been reached.
Quote:
From the ANSI C Standard:
7.19 Input/output <stdio.h>
7.19.1 Introduction
1 The header <stdio.h> declares three types, several macros, and many functions for performing input and output....
...3 The macros are...
...EOF
which expands to an integer constant expression, with type int and a negative value, that is returned by several functions to indicate end-of-file, that is, no more input from a stream;
The operating system and file system know where the end of the data is. This is different than the "file size" reported by Windows Explorer, which is based on the cluster / file allocation unit size, and includes unused/wasted space in the cluster.