Chapter 2. Data

Data is as important to a programmer as money is to a banker (and that’s saying something!); it’s the lifeblood of computing. The most important attribute of data is type, which determines what data can be stored and in what format.

C ++ has two basic kinds of types: primitive (or “built-in”) types, which are inherent in the C++ language itself, and user-defined types (primarily classes, structures, and arrays), which are built on top of existing types. C++ recognizes almost no difference between primitive and user-defined types, except that primitive types are predefined. But once a new type is declared in the source code or a library, you can use it just as you would a primitive type. In this respect, C++ differs from most other ...

Get C++ for the Impatient now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.