O'Reilly logo

Beginning C++ Through Game Programming, Third Edition by Michael Dawson

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 8. Classes: Critter Caretaker

Object-oriented programming (OOP) is a different way of thinking about programming. It’s a modern methodology that’s used in the creation of the vast majority of games (and other commercial software, too). In OOP, you define different types of objects with relationships to each other that allow the objects to interact. You’ve already worked with objects from types defined in libraries, but one of the key characteristics of OOP is the ability to make your own types from which you can create objects. In this chapter, you’ll see how to define your own types and create objects from them. Specifically, you’ll learn to:

  • Create new types by defining classes

  • Declare class data members and member functions

  • Instantiate ...

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