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]

Re: class iostream


On Mar  1, 2000, pedro <pedro@jigen.iet.unipi.it> wrote:

> ifstream input;
> input.open("file.ini",ios::nocreate);

Yep, it was a bug that ifstream::open didn't implicitly add io::in to
the bit-mask.  IIRC, this was fixed recently in the development tree.

> input.open("file.ini",ios::nocreate||io::in);
                                     ^^
here you should use `|', not `||'

-- 
Alexandre Oliva     http://www.ic.unicamp.br/~oliva/     Enjoy Guaranį
Cygnus Solutions, a Red Hat company        aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist    CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org}   Write to mailing lists, not to me


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