Summary

Section 3.1 Introduction

  • Each class you create becomes a new type you can use to declare variables and create objects.

  • C++ is an extensible programming language (p. 74)—you can define new class types as needed.

Section 3.2 Test-Driving an Account Object

  • Classes cannot execute by themselves.

  • A main function can “drive” an object by calling its member functions—without knowing how the class is implemented. In this sense, main is referred to as a driver program (p. 75).

Section 3.2.1 Instantiating an Object

  • Typically, you cannot call a member function of a class until you create an object of that class.

Section 3.2.2 Headers and Source-Code Files

  • The compiler knows about fundamental types that are “built into” C++.

  • A new ...

Get C++ How to Program, 10/e 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.