The document provides an overview of key concepts in C++ classes including this pointer, constant member functions, static members, friends of classes, memberwise assignment, copy constructors, operator overloading, type conversion operators, convert constructors, object composition, inheritance, protected members, constructors and destructors with inheritance, and overriding base class functions.
59. 11- private: x protected: y public: z private: x protected: y public: z private: x protected: y public: z Base class members x inaccessible private: y private: z x inaccessible protected: y protected: z x inaccessible protected: y public: z How base class members appear in derived class private base class protected base class public base class
60.
61.
62.
63.
64.
65.
66.
67.
Notas do Editor
See pr11-01.cpp
See pr11-02.cpp, budget.h
See pr11-03.cpp, budget2.cpp, and budget2.h
See pr11-04.cpp, auxil.h, budget3.h, auxil.cpp, and budget3.cpp
See pr11-05.cpp
See pr11-06.cpp
See pr11-07.cpp, NumberArray.h, and NumberArray.cpp
See pr11-08.cpp, NumberArray2.h, and NumberArray2.cpp
See pr11-09.cpp, overload.h, and overload.cpp
See feetinch2.h, feetinch2.cpp, pr11-10.cpp
See feetinch3.h feetinch3.cpp, pr11-11.cpp for first bullet; See feetinch4.h, feetinch4.cpp, and pr11-12.cpp for second bullet; See feetinch5.h, feetinch5.cpp, and pr11-13.cpp for the last bullet.
See intarray.h, intarray.cpp, pr11-15.cpp
See feetinch6.h, feetinch6.cpp, and pr11-17.cpp
See Convert.h, Convert.cpp, and pr11-18.cpp
See pr11-19.cpp
See inheritance1.h, inheritance1.cpp, pr11-21.cpp
See pr11-22.cpp
See inheritance2.h, inheritance2.cpp, pr11-23App.cpp