This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

class iostream


version: egcs-2.91.66
system type: linux
options:  -c -fexceptions -I/usr/lib/g++ -o3

I wrote code with the use of exception handling and i found that the
iostream class doesn't work. Here a code example
char buff[200];
ifstream input;
input.open("file.ini",ios::nocreate);
input.getline(buff);

The variable buff is now 0 becouse the getline doesn't work.

If i leave the same code and the same files but i declare

fstream input;
input.open("file.ini",ios::nocreate||io::in);

the getline works properly

Thank for the existance of GNU

Pedroni Davide




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]