Skip to Content
C++ How to Program, Sixth Edition
book

C++ How to Program, Sixth Edition

by P. J. Deitel - Deitel & Associates, Inc., H. M. Deitel - Deitel & Associates, Inc.
July 2007
Beginner to intermediate
1504 pages
44h 24m
English
Pearson
Content preview from C++ How to Program, Sixth Edition

Chapter 9. Classes: A Deeper Look, Part 1

 

My object all sublime I shall achieve in time.

 
 --W. S. Gilbert
 

Is it a world to hide virtues in?

 
 --William Shakespeare
 

Don’t be “consistent,” but be simply true.

 
 --Oliver Wendell Holmes, Jr.
 

This above all: to thine own self be true.

 
 --William Shakespeare

OBJECTIVES

In this chapter you’ll learn:

  • How to use a preprocessor wrapper to prevent multiple definition errors caused by including more than one copy of a header file in a source-code file.

  • To understand class scope and accessing class members via the name of an object, a reference to an object or a pointer to an object.

  • To define constructors with default arguments.

  • How destructors are used to perform “termination housekeeping” on an object before it ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C++ How to Program, 10/e

C++ How to Program, 10/e

Paul Deitel, Harvey Deitel
C++ How to Program, Ninth Edition

C++ How to Program, Ninth Edition

Paul Deitel, Harvey Deitel

Publisher Resources

ISBN: 9780136085669Purchase book