Mail Archives: djgpp/2001/12/27/12:02:49
Nithyanandham wrote:
> J wrote:
>
> > If the construction of an ifstream object fails in the sense that its boolean
> > value has become false (e.g. because the supplied file doesn't exist), but
> > later on its member function open is successfully called, should the boolean
> > value of the object be true again? If it should, my compiler (DJGPP 3.02) has
> > a bug.
>
> When you open the files using ifstream constructor , the failbit is not affected.
>
> You should check the failbit status with is_open() member function.
Typo. It should be
You should check the whether it was succesful or failed with is_open() member
function.
--
Nithyanand.
Siemens, Bangalore, India.
(Opinions expressed are my own and do not reflect the opinions of my employer,
Siemens)
- Raw text -