© Ivor Horton and Peter Van Weert 2018
Ivor Horton and Peter Van WeertBeginning C++17https://doi.org/10.1007/978-1-4842-3366-5_11

11. Defining Your Own Data Types

Ivor Horton1  and Peter Van Weert2
(1)
Stratford-upon-Avon, Warwickshire, UK
(2)
Kessel-Lo, Belgium
 

In this chapter, we’ll introduce one of the most fundamental tools in the C++ programmer’s toolbox: classes. We’ll also present some ideas that are implicit in object-oriented programming and show how they 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 the different building blocks of a class are—member variables, member functions, class ...

Get Beginning C++17: From Novice to Professional 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.