Chapter 11. Classes: A DeeperLook, 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

OBJECTIVES

In this chapter you’ll learn:

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

  • To create objects composed of other objects.

  • To use friend functions and friend classes.

  • To use the this pointer.

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

  • To use static data members and member functions.

  • The concept of a container class.

  • The notion of iterator classes that walk through the elements of container ...

Get Visual C++ 2008: How to Program, Second 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.