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++ was intended as the successor to C. What I haven't told you is exactly why it was invented.

To understand this, we'll have to consider the differences between two basic kinds of variables that exist in both C and C++: native (i.e., defined in the language itself) and user-defined (i.e., defined by the programmer). The native types that we've been using are char, short, and unsigned short (and int, but only for the return type of main), all of which have been inherited from C.[1] The user-defined types we've been using are the string, Vec, and the types of cin and ...

Get C++: A Dialog Programming with the C++ Standard Library now with O’Reilly online learning.

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