O'Reilly logo

Sams Teach Yourself C++ in One Hour a Day, Seventh Edition by Siddhartha Rao

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

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 ...

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