Subj : End of file in Windows To : borland.public.cpp.commandlinetools,borland.public.cpp.borlandcpp,comp.windows.misc From : karlman@email.si (Karlman) Date : Wed Oct 29 2003 12:10 am Hello! I have a problem with a C++ program under Windows but which works fine under Linux. The program simply reads in integers from a file (source code below): ifstream in_file; int number; in_file.open("whatever"); while (!in_file.eof()) in_file >> number; In Linux it reads all the numbers in the file no matter how EOF is positioned: right after the last number or on the next line in in_file. In Windows it won't read the last number unless there's an empty line at the end of the file. Example: 1 2 3 4 5 6 7EOF -> this works under Linux but not under Windows 1 2 3 4 5 6 7 EOF -> this works under both OS's I use gcc 2.96 under Linux and Borland C++ 5.5.1 under Windows. Could anyone help me with this one, please. I would appreciate it very much. Karlo Basic .