dave wrote:
Why do we ever need to use unsigned char? Any examples will help a
lot.
Any time you need a so-called byte (do not mix it with octet, bytes can have
more than 8 bits). For example in preparing a bit-map command for a device,
which is driven by command bytes. Also buffers (usually command buffers)
for external devices or (binary) protocol are built using unsigned
characters.
Also please remember, that it is implementation defined if char (without
telling if it is signed or not) is signed or not! So on some architectures
the char used is in fact an unsigned char.
Attila aka WW