O'Reilly logo

Navigating C++ and Object-Oriented Design by Gail Anderson, Paul Anderson

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 5. Working with Classes

Now that you understand the benefits of encapsulation and how to build objects with class constructors, let's learn more about what you can do with class definitions. This chapter explores namespaces with classes, class containment, static class members, and pointers to class members. We also discuss how to use friend and nested classes in designs and why the explicit keyword helps control unwanted type conversions. These concepts give you all the tools you'll need to formulate the right class definition for the right application.

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