Section 14.13 Word Matching Exercise
Operator Overloading
Friend Class
Friend Function
Rule of Three
refers to the copy constructor, the = assignment operator, and the destructor. If they are not defined explicitly, all three are created by the compiler automatically. You should customize them if the class contains a pointer data field. If you have to customize one of the three, you should customize the other two as well. | |
is to define functions for operators. | |
is a class defined as a friend of a class using the friend keyword and can access private members of this class. | |
is a function defined as a friend of a class using the friend keyword and can access private members of this class. |