This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


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

Re: Problem with ifstream


> >   std::ifstream ifs;
> > 
> >   ifs.open("FOO");
> >   std::cout << (bool)ifs << std::endl;
> >   std::string str;
> >   while(ifs) {
> >     getline(ifs, str);
> >     std::cout << str << std::endl;
> >   }
> >   ifs.close();
> 
> // I hope it'll help:-)
> ifs.clear();

This behavior was deemed Not A Bug. See this link for more info:

http://sourceware.cygnus.com/ml/libstdc++/2000-06/msg00254.html

-benjamin

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