Mail Archives: djgpp/2001/07/11/20:15:16
On Wed, 11 Jul 2001 16:53:25 -0500 (CDT), Jeff Bastian
<bastian AT hc DOT ti DOT com> wrote in comp.os.msdos.djgpp:
>
> I just modified my code to use read() instead of fread() as a work-around,
> but read() demonstrates the same problem of skipping over the 0x0d
> character.
Change your program back to using fread(), which is standard,
portable, and guaranteed to be available on every C and C++ compiler
in the known and unknown world.
Then open files for binary input/output in binary mode, that is "rb"
instead of "r" and "wb" instead of "w", for the mode argument to
fopen().
--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
- Raw text -