Mail Archives: djgpp/1998/01/30/21:13:36
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
- Raw text -