Lesson 9. Classes and Objects

So far you have explored the structure of a simple program that starts execution at main() and enables you to declare local and global variables and constants and branch your execution logic into function modules that can take parameters and return values. All this is very similar to a procedural language like C, which has no object-orientation to it. In other words, you need to learn about managing data and connecting methods to it.

In this lesson, you will learn

• What classes are

• How classes help you consolidate data with methods (akin to functions) that work on them

• About constructors, copy constructors, and destructors

• How C++11 helps improve performance via the move constructor

• Object-oriented concepts ...

Get Sams Teach Yourself C++ in One Hour a Day, Seventh Edition 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.