Please enable JavaScript.
Coggle requires JavaScript to display documents.
Chapter's 19 e 20 - Coggle Diagram
Chapter's 19 e 20
-
Overloading Operators
The assignment operator =, the address operator &, and the comma operator, have a predefined meaning for each built-in type. This meaning can be changed for classes by a definition of your own
You cannot create “new operators”—that is, you can only overload existing operrators.
-
You cannot change the operands of an operator. A binary operator will always be binary and a unary operator will always be unary.
-
-
Function call ()
The function call operator () is used to represent operations for objects like function calls. The overloaded operator -> enables the use of objects in the same way as pointers.
-
-
The Friend Concept
If functions or individual classes are used in conjunction with another class, you may want to grant them access to the private members of that class. This is made possible by a friend declaration, which eliminates data encapsulation in certain cases.