home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH08 / A08102.TXT < prev    next >
Encoding:
Text File  |  1993-09-15  |  341 b   |  7 lines

  1. In this definition of the Fraction class, the functions print()
  2. and display() do the same thing.  The function print() is declared
  3. to be a friend of the class and, therefore, can access all public
  4. and private members of the Fraction class.  Notice how the
  5. function print() uses the private members num and denom of the
  6. Fraction class.
  7.