There are three char types in C++. unsignedchar, signedchar and char. They are the smallest integer types taking 1 byte of memory (sizeof(char) == 1) so they can't hold as big values as other bigger integer types like int.
unsignedchar can only hold positive values (including zero). signedchar can hold both positive and negative values. Because of this it can't hold as big values as unsignedchar. char can be signed or unsigned depending on compiler but it is often signed.
char is often used to store a character (digit, letter or some other symbol). This use is so common that the standard output functions assume it is a character and not a number.
1 2
char ch = 'A';
std::cout << ch; // Prints A.
1 2
char ch = 65; // ASCII value for A.
std::cout << ch; // Prints A (assuming ASCII encoding is used).
If you want to print the numerical value of a char you can cast it to an int.
actually thats not right. those are three ranges for a character, but its one type. there are two types in c++ ascii and utf. they are just character sets that print to the screen. and btw all of those you posted peter are all of type char. unsigned and signed are prefixes like static or const
Objects declared as characters (char) shall be large enough to store any member of the implementation’s basic character set. If a character from this set is stored in a character object, the integral value of that character object is equal to the value of the single character literal form of that character. It is implementation-defined whether a char object can hold negative values. Characters can be explicitly declared unsigned or signed. Plain char, signed char, and unsigned char are three distinct types. A char, a signed char, and an unsigned char occupy the same amount of storage and have the same alignment requirements (3.11); that is, they have the same object representation. For character types, all bits of the object representation participate in the value representation. For unsigned character types, all possible bit patterns of the value representation represent numbers. These requirements do not hold for other types. In any particular implementation, a plain char object can take on either the same values as a signed char or an unsigned char; which one is implementation-defined.
I use the N3290 draft which is the final draft so the main content should be identical to the real C++11 standard. This draft was accidentally available for download but has now been removed. You can probably find it if you search for it.