Hi Edwin, > in.open("bar",ios::ate); The "ios::ate" positions the read stream at the end of file. Did you mean... in.open("bar", ios_base::in | ios_base::binary); ...? (I think "ios" was deprecated/obsolesced in favor of "ios_base".) Also, you may want to use... #include <iostream> #include <fstream> ...instead of the headers you have. --Eljay