From: Shawn Hargreaves Newsgroups: comp.os.msdos.djgpp Subject: Re: File reading Date: Fri, 30 Jan 1998 19:14:12 +0000 Organization: None Distribution: world Message-ID: References: <34CC6531 DOT A6869055 AT mail DOT htk DOT fi> NNTP-Posting-Host: talula.demon.co.uk MIME-Version: 1.0 Lines: 22 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Henri Ossi writes: >How can I > >1)read 8bits from a file Call fgetc(). >2)write 8bits to a file Call fputc(). >Char is 16bit long, right? What gave you this idea? Using djgpp, as with most 32 bit compilers, a char is 8 bits, a short is 16 bits, and an int or long is 32 bits. Although it is perfectly legal according to the ANSI standard, compilers with anything other than an 8 bit character type are very unusual... -- Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/ "Pigs use it for a tambourine" - Frank Zappa