EOF está declarado en stdio, a menos que iostream lleve un include stdio no tendras declarada la macro EOF. Esta es la definicion de EOF:
End-of-File
It is a macro definition of type int that expands into a negative integral constant expression (generally, -1).
It is used as the value returned by several functions in header <stdio> to indicate that the End-of-File has been reached or to signal some other failure conditions.
It is also used as the value to represent an invalid character.
Si de todas formas quieres usar EOF sin incluir stdio puedes crear tu propia macro:
Código:
#ifndef EOF
#define EOF (-1)
#endif
Saludos
vosk