Chapter 2. Top of the class

Table of Contents

2.1. First, There Was struct
2.2. Class Definitions
2.3. Member Access Specifiers
2.4. Encapsulation
2.5. Introduction to UML
2.5.1. UML Relationships
2.6. Friends of a Class
2.7. Constructors
2.8. Destructors
2.9. The Keyword static
2.10. Class Declarations and Definitions
2.11. Copy Constructors and Assignment Operators
2.12. Conversions
2.13. const Member Functions
2.14. Subobjects
2.15. Exercise: Classes
2.16. Review Questions

[ fromfile: classes.xml id: classes ]

Abstract

This chapter provides an introduction to classes and objects, and how member functions operate on objects. Classes and objects can be arranged in different structures, and this chapter presents some ways to describe the relationships between them. UML is introduced. static and const members are explained. Constructors, destructors, copy operations, and friends are discussed.