In UNIX OS, in general, the EOF can be generated by typing CTRL+D;
In WINDOWS OS, in general, the EOF can be generated by typing CTRL+Z.
Reference:
S.B. Lippman, "C++ Primer (5th version)", PUBLISHING HOUSE OF ELECTRONICS INDUSTRY, Beijing, 2013