Chapter 21. Classes: A Deeper Look, Part 2

 

But what, to serve our private ends, Forbids the cheating of our friends?

 
 --Charles Churchill
 

Instead of this absurd division into sexes they ought to class people as static and dynamic.

 
 --Evelyn Waugh
 

Have no friends not equal to yourself.

 
 --Confucius
<feature><title>Objectives</title>

In this chapter you will learn:

<objective>

To specify const (constant) objects and const member functions.

</objective>
<objective>

To create objects composed of other objects.

</objective>
<objective>

To use friend functions and friend classes.

</objective>
<objective>

To use the this pointer.

</objective>
<objective>

To create and destroy objects dynamically with operators new and delete, respectively.

</objective>
<objective> ...

Get C How to Program, Fifth Edition 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.