Mail Archives: djgpp/2000/08/24/01:54:43
> From: "Rafal Maj" <r_maj AT poczta DOT onet DOT pl>
> Newsgroups: comp.os.msdos.djgpp
> Date: Wed, 23 Aug 2000 21:34:22 +0200
>
> I think ther is bug in I/O binary mode :
No, this isn't a bug.
> I can't open ofstream / ifstream in ios::binary mode.
> When I use :
> ifstream plik; plik.open("test.txt",ios::binary); plik<<"OK ;)";
> plik.close();
> then test.txt is empty. When I don't use ios::binary, then everything is OK.
See section 9.4 of the FAQ, it's all there: you need to say
"ios:binary | ios:out", and then it will work.
One of the libstdc++ maintainers explained some time ago that this is
how the C++ library is supposed to work.
> Where I can download new version of DJGPP that don't have this bug,
> or how can I do workaround of this bug ?
Please don't jump to conclusions too quickly. Most of the problems we
meet as programmers are our own bugs.
- Raw text -