Operator Overloading
  1. A variable's type specifies a:
  2. When you define a class in a program, you are essentially defining a new type.
  3. operator overloading is the process of changing the meaning of an operator for a specific class.
  4. When you overload an operator for a class, the operator's function does not change for other variable types; C++ compiler will determine which operation to employ based on the variable type.
  5. operators you cannot overload object.member, classname::member, ?:
  6. To overload an operator, you must define a class to which the operator will be assigned.
  7. When you overload an operator, the overload is in effect for the class in which it is defined; if the program uses the operator with non-class variables, the operator's original definition is used.
  8. To overload an operator you can use the C++ operator keyword to define a class method.
Private members and friends