Skip to Main Content
C++ Primer, Fourth Edition
book

C++ Primer, Fourth Edition

by Stanley B. Lippman, Josée Lajoie, Barbara E. Moo
February 2005
Intermediate to advanced content levelIntermediate to advanced
912 pages
25h 26m
English
Addison-Wesley Professional
Content preview from C++ Primer, Fourth Edition

Chapter 12. Classes

CONTENTS

Section 12.1 Class Definitions and Declarations 430

Section 12.2 The Implicit this Pointer 440

Section 12.3 Class Scope 444

Section 12.4 Constructors 451

Section 12.5 Friends 465

Section 12.6 static Class Members 467

Chapter Summary 473

Defined Terms 473

In C++ we use classes to define our own abstract data types. By defining types that mirror concepts in the problems we are trying to solve, we can make our programs easier to write, debug, and modify.

This chapter continues the coverage of classes begun in Chapters 2 and 5. We’ll cover in more detail the importance of data abstraction, which lets us hide the internal representation of an object while still allowing public operations to be performed on the object. ...

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++ Primer, Fifth Edition

C++ Primer, Fifth Edition

Stanley B. Lippman, Josée Lajoie, Barbara E. Moo
Advanced C++

Advanced C++

Gazihan Alankus, Olena Lizina, Rakesh Mane, Vivek Nagarajan, Brian Price

Publisher Resources

ISBN: 0201721481Purchase book