How to convert a char into an int from 0 through 255?

brnstnd at stealth.acf.nyu.edu brnstnd at stealth.acf.nyu.edu
Sun Jan 7 08:37:08 AEST 1990


From: brnstnd at stealth.acf.nyu.edu

The question is self-explanatory. This is a practical question as well
as a theoretical one: I'd like a solution that is both conformant and
portable in the real world. Does (int) (unsigned int) ch do the trick?
What about (int) (unsigned char)?

---Dan

Volume-Number: Volume 18, Number 8



More information about the Comp.std.c mailing list