1. Procedural programming and object-oriented programming
2. Abstraction and Class
1. Programs that use class objects can access the public part directly, but only through public member functions (or friend functions) to access the private members of the object
2. You can define a member function outside of a class declaration and make it an inline function
3. Constructors and destructors for classes
1. A constructor that accepts a parameter allows an object to be initialized to a value using the assignment syntax
4. This pointer
5. Array of objects
6. Class Scope
1. The following class definition method is wrong and should not exist before declaring the class
1 class Bakery 2 {3private:4 Const int A ; 5 Double Costs[month]; 6 }
There are two ways to solve
1 classBakery2 {3 Private:4 enum{Month = A};//Enumeration5 DoubleCosts[month];6 };7 8 classCakery9 {Ten Private: One Static Const intMonth = A;//Static A DoubleCosts[month]; -};
7. Abstract data types
"C + + Primer Plus 6th" Reading notes-tenth chapter objects and classes