Summary

C++'s basic types fall into two groups. One group consists of values that are stored as integers. The second group consists of values that are stored in a floating-point format. The integer types differ from each other in the amount of memory used to store values and in whether they are signed or unsigned. From smallest to largest, the integer types are bool, char, signed char, unsigned char, short, unsigned short, int, unsigned int, long, and unsigned long. There also is a wchar_t type whose placement in this sequence of size depends on the implementation. C++ guarantees that char is large enough to hold any member of the system's basic character set, wchar_t can hold any member of the system's extended character set, short is at least ...

Get C++ Primer Plus, Fourth Edition 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.