On Fri, 03 Oct 2003 19:28:07 +0200, Wolfgang Jeltsch
<je*****@tu-cottbus.de> wrote:
Hello,
what does the ANSI C++ standard say about the minimal range of the char
type? Is it guaranteed that char contains at least the numbers from 0 to
255?
On many platforms, including IIRC MSVC++, it has the range [-128, 127]
- remember, it can represent the same values as either signed or
unsigned char. However, unsigned char does have at least that range,
since it much have 8-bits or more, and every bit pattern must
represent a unique number (due to the modulo arithmetic rules).
Tom