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 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.