SIMPLE getchar() question
Ray Wallace
wallace at ynotme.enet.dec.com
Fri Oct 5 01:20:22 AEST 1990
In article <14737 at mentor.cc.purdue.edu>, schikore at mentor.cc.purdue.edu (Dan Schikore) writes...
>I am having trouble getting TC 2.0 to read in a binary 0. It considers
>it EOF. I simply have the statement:
>
>while ((i=getc(fp)) != EOF) {}
When you open the file do you open it as a BINARY file? If not then you need
to. ie:
fp = fopen( "name", "rb" );
---
Ray Wallace
(INTERNET,UUCP) wallace at oldtmr.enet.dec.com
(UUCP) ...!decwrl!oldtmr.enet!wallace
(INTERNET) wallace%oldtmr.enet at decwrl.dec.com
---
More information about the Comp.lang.c
mailing list