Skip to main content
O'Reilly home
    • Sign In
    • Try Now
    • Teams
      • For business
      • For government
      • For higher ed
    • Individuals
    • Features
      • Certifications
      • Interactive learning
      • Live events
      • Answers
      • Insights reporting
    • Blog
    • Content sponsorship

Programming in C++, 2nd Edition by

Get full access to Programming in C++, 2nd Edition and 60K+ other titles, with free 10-day trial of O'Reilly.

There's also live online events, interactive content, certification prep materials, and more.

Start your free trial

Chapter 8

Classes and Objects

CHAPTER OUTLINE

8.1  Introduction

8.2  Structure in C

8.3  Structure in C++

8.4  Classes in C++

8.5  Declaring Objects

8.6  The public Keyword

8.7  The private Keyword

8.8  The protected Keyword

8.9  Access Specifiers and Their Scope

8.10  Defining Member Functions

8.11  Characteristics of Member Functions

8.12  Outside Member Function as Inline

8.13  Rules for Inline Functions

8.14  Data Hiding or Encapsulation

8.15  Classes, Objects, and Memory

8.16  static Member Variables

8.17  static Member Functions

8.18  static Object

8.19  Array of Objects

8.20  Objects as Function Arguments

8.21  friend Functions

8.22  The const Member Functions

8.23  The Volatile Member Function

8.24  Recursive Member Function

8.25  Local ...

Get Programming in C++, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.

Start your free trial

About O’Reilly

  • Teach/write/train
  • Careers
  • Community partners
  • Affiliate program
  • Submit an RFP
  • Diversity
  • O’Reilly for marketers

Support

  • Contact us
  • Newsletters
  • Privacy policy
facebook-logo linkedin-logo youtube-logo

Download the O’Reilly App

Take O’Reilly with you and learn anywhere, anytime on your phone and tablet.

Apple app store Google play store

Watch on your big screen

View all O’Reilly videos, Superstream events, and Meet the Expert sessions on your home TV.

Roku Payers and TVs Amazon appstore

Do not sell my personal information

O'Reilly home

© 2022, O’Reilly Media, Inc. All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.

Terms of service • Privacy policy • Editorial independence

Don’t leave empty-handed

Get Mark Richards’s Software Architecture Patterns ebook to better understand how to design components—and how they should interact.

It’s yours, free.

Get it now
Cover of Software Architecture Patterns