problems with ifstream using G++ 3.0.3

John Love-Jensen eljay@adobe.com
Tue Jun 11 07:00:00 GMT 2002


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 




More information about the Gcc-help mailing list