O'Reilly logo

Beginning C++ by Ivor Horton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 11

image

Defining Your Own Data Types

In this chapter, I’ll introduce one of the most fundamental tools in the C++ programmer’s toolbox: classes. I’ll also present some ideas that are implicit in object-oriented programming and show how these are applied.

In this chapter you’ll learn:

  • What the basic principles in objected-oriented programming are
  • How you define a new data type as a class, and how you can create and use objects of a class type
  • What class constructors are, and how you define them
  • What the default constructor is, and how you can supply your own version
  • What the default copy constructor is
  • What a friend function is
  • What privileges ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required