Character types

The char type is an integer, so signed char and unsigned char exist too. These are three distinct types; the signed char and unsigned char types should be treated as numeric types. The char type is used to hold a single character in the implementation's character set. In Visual C++, this is an eight-bit integer that can hold characters from the ISO-8859 or UTF-8 character set. These character sets are able to represent the characters used in English and most European languages. Characters from other languages take up more than one byte and C++ provides the char16_t type to hold 16-bit characters and char32_t to hold 32-bit characters.

There is also a type called wchar_t (wide character) that will be able to hold characters ...

Get Beginning C++ Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.