Here is the complete list of fundamental types in C++:
Notes on size /
Group Type names*
precision
Exactly one byte in
char
size. At least 8 bits.
Not smaller than char.
char16_t
At least 16 bits.
Character types Not smaller than
char32_t char16_t. At least 32
bits.
Can represent the
wchar_t largest supported
character set.
Same size as char. At
signed char
least 8 bits.
Not smaller than char.
signed short int
At least 16 bits.
Not smaller than
Integer types (signed) signed int
short. At least 16 bits.
Not smaller than int.
signed long int
At least 32 bits.
Not smaller than long.
signed long long int
At least 64 bits.
unsigned char
unsigned short int
Integer types unsigned int (same size as their
(unsigned) unsigned long int signed counterparts)
unsigned long long
int
float
Precision not less than
double
Floating-point types float
Precision not less than
long double
double
Boolean type bool
Void type void no storage
Null pointer decltype(nullptr)
Type sizes above are expressed in bits; the more bits a type has, the more
distinct values it can represent, but at the same time, also consumes
more space in memory:
Unique
Size representable Notes
values
8-bit 256 = 28
16-bit 65 536 = 216
32-bit 4 292 967 296 = 232 (~4 billion)
18 446 744 073 309 = 264 (~18 billion
64-bit 551 616 billion)
http://stackoverflow.com/questions/589575/what-does-the-c-standard-state-the-size-
of-int-long-type-to-be
1 signed char: -127 to 127 (note, not -128 to 127; this
accommodates 1's-complement platforms)
2 unsigned char: 0 to 255
3 "plain" char: -127 to 127 or 0 to 255 (depends on default
char signedness)
4 signed short: -32767 to 32767
5 unsigned short: 0 to 65535
6 signed int: -32767 to 32767
7 unsigned int: 0 to 65535
8 signed long: -2147483647 to 2147483647
9 unsigned long: 0 to 4294967295
10 signed long long: -9223372036854775807 to
9223372036854775807
11 unsigned long long: 0 to 18446744073709551615