Classes and Object-Oriented Programming
Classes are C++'s mechanism for bundling "data" and "operations" together, and they form the cornerstone of object-oriented programming. In this chapter, we start with the simplest class definitions and gradually figure out how to write constructors, when destructors are called, the differences between static members and regular members, and what the "privileged channel" of friends is all about. Once we understand these concepts, we can write our own well-encapsulated types.