Chapter 6. Taking Inventory

Now we have enough of the fundamentals of programming under our belts to look at some of the more powerful features of C++. As I've mentioned before, C++ is the successor to C. What I haven't told you is why it was invented. One of the main reasons was to improve on C's support for user defined data types. What are these, and why are they so important?

As is the case with C++, the data types available in C are divided into two groups: native (i.e., defined in the language itself) and user defined (i.e., defined by the programmer). However, there is a major difference between C and C++ in the support provided to user defined types. In C, variables of the native types are fully supported by the language, while variables ...

Get Learning to Program in C++ 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.