1. Point P,int R:p (_p) {}Object P P.print ();//code reuse call the print function in point2. Object member variables, which do not appear initialized with the initialization list, the compiler will still automatically invoke the constructor (default construct) in the class that the member variable belongs to to initialize the object member variables. 3. Const:const modifier Functions, only the member functions of the class can be decorated. the value of a member variable cannot be modified in the const member function bodyConst member functions can only be called by the const member function bodyConst objects can only call const member functions4. Destructors:function: Reclaims the resources of an object when the object's life cycle ends. Features: no return value; * cannot be loaded; * cannot be overloaded; * Access rights are publicDestructors are automatically called by the compiler and are called in three ways: The destructor is called when the object's scope ends, the destructor is called when the object is destroyed, and the destructor is called when the delete pointer is to the object. the function name of the destructor begins with a ~ followed by the class name. such as ~circle ().
C + + Next day Note January 27, 2016 (Wednesday) p.m.