Chapter 10. Objects and Classes

In this chapter you’ll learn about the following:

Procedural and object-oriented programming

• The concept of classes

• How to define and implement a class

• Public and private class access

• Class data members

• Class methods (also called class function members)

• Creating and using class objects

Class constructors and destructors

const member functions

The this pointer

• Creating arrays of objects

Class scope

Abstract data types

Object-oriented programming (OOP) is a particular conceptual approach to designing programs, and C++ has enhanced C with features that ease the way to applying that approach. The following are the most important OOP features:

• Abstraction

• Encapsulation and data hiding ...

Get C++ Primer Plus, Fifth Edition now with the O’Reilly learning platform.

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