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 |
In this chapter you will learn:
<objective>To specify const
(constant) objects and const
member functions.
To create objects composed of other objects.
</objective> <objective>To use friend
functions and friend
classes.
To use the this
pointer.
To create and destroy objects dynamically with operators new
and delete
, respectively.
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.