This recipe will show all the primitive data types defined by the C++ standard, as well as their size.
Understanding C++ primitive types
How to do it...
In this section, we'll have a closer look at what primitives the C++ standard defines and what other information is important. We'll also learn that although the standard does not define a size for each, it defines another important parameter:
- First, open a new Terminal and type in the following program:
#include <iostream>
#include <limits>
int main ()
{
// integral types section
std::cout << "char " << int(std::numeric_limits<char>::min())
<< "-" << int(std::numeric_limits<char...