Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sun-barr!decwrl!bacchus.pa.dec.com!shlump.nac.dec.com!engage.enet.dec.com!ynotme.enet.dec.com!wallace From: wallace@ynotme.enet.dec.com (Ray Wallace) Newsgroups: comp.lang.c Subject: Re: SIMPLE getchar() question Message-ID: <2087@engage.enet.dec.com> Date: 4 Oct 90 15:20:22 GMT Sender: news@engage.enet.dec.com Distribution: usa Organization: Digital Equipment Corporation Lines: 15 In article <14737@mentor.cc.purdue.edu>, schikore@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@oldtmr.enet.dec.com (UUCP) ...!decwrl!oldtmr.enet!wallace (INTERNET) wallace%oldtmr.enet@decwrl.dec.com ---