OOPortal
J2EEOnline RationalDB
prev next prev next
  Course navigation
 
Lesson 7
Objective
Unary and binary operator overloading
Difference between overloading unary/binary operators.
   
Unary and binary operators can be overloaded as nonstatic member functions. Implicitly they are acting on a class value.
Unary operators can be overloaded as ordinary functions that take a single argument of class or reference to class type.
Binary operators can be overloaded as ordinary functions that take one or both arguments of class or reference to class type.
In the next several lessons, we'll look closely at overloading both unary and binary operators.
  Course navigation