O'Reilly logo

SAMS Teach Yourself C++ in 10 Minutes SECOND EDITION by Jesse Liberty

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

Summing Up

In this lesson, you have seen that classes are like structs with member functions. You have been introduced to the public and private visibility keywords and have learned that classes have special functions called constructors and destructors to allow for initialization and for freeing heap-allocated storage before destruction. You have seen that a class can have multiple constructors, including a copy constructor. Finally, you have seen how to declare types within a class declaration and use them outside the class.

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