Mail Archives: djgpp/1995/08/01/14:30:42
Hi,
I have the following problem: When running this program
#include <fstream.h>
int main(void)
{
unsigned char buff;
ofstream WriteFile("test.out",ios::bin);
ifstream ReadFile("test.in",ios::bin);
while(!ReadFile.eof())
{
ReadFile.get(buff);
WriteFile.put(buff);
cout << buff;
}
return 0;
}
which simply should copy one file to another, it reads only on character
and then exits. If I open the file in text mode all works well.
Anybody a hint what I'm doing wrong?
Torsten
- Raw text -