home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH11 / A11193.TXT < prev    next >
Encoding:
Text File  |  1993-10-12  |  498 b   |  9 lines

  1. This is the part of the Fraction class definition that declares
  2. the input and output operators to be friends of the Fraction
  3. class.  The operators are declared as friends rather than member
  4. functions so that they have the same syntax as the operators for
  5. built-in types.  If they were declared as member functions, they
  6. would have to take an object of the class as their first operand.
  7. As friends, they can be defined to take an istream object or an
  8. ostream object as their first argument.
  9.