Subj : while(in) To : borland.public.cpp.borlandcpp From : Les Hurley Date : Sun Mar 21 2004 11:05 pm Here is a snippet of strangely mis-behaving code. file "test.txt" contains numbers separated by white space, e.g. 1 2 3 4 5 one would expect the output to screen to be identical, but it turns out to be 1 2 3 4 5 5. It makes no difference if the white space precedes or succeeds the number or both. can someone explain? Thanks. float n; ifstream in("test.txt"); if(!in){cout<<"Can't open file."; getch(); return 1;} while(in){in>>n; cout<