This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: Problem with ifstream
- To: Levente Farkas <lfarkas at mindmaker dot hu>
- Subject: Re: Problem with ifstream
- From: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Fri, 30 Jun 2000 08:52:15 -0700 (PDT)
- cc: Benoit Sibaud <benoit dot sibaud at rd dot francetelecom dot fr>, libstdc++ <libstdc++ at sourceware dot cygnus dot com>
> > 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