Integral Types

On all computer architectures, the C++ integer type represents the most basic type. What does "basic" mean? It simply means that the values of this type are always the fastest to operate on the given platform. The keyword int is used to denote this type.

int cnt;

The size of int defines the range of values available for representation (2 to the power of the number of bits). The industry is now shifting from 16-bit architectures to 32-bit architectures, but both architectures are going to be used for some time. Most stationary installations will use 32-bit computers, but embedded systems and communications systems will continue to use 16-bit computers, and the number of these systems is going to grow as computers find their way ...

Get Core C++ A Software Engineering Approach 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.