home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH08 / A08107.TXT < prev    next >
Encoding:
Text File  |  1993-10-18  |  451 b   |  8 lines

  1. It is usually possible to replace a friend function with a
  2. function that is not a friend, if the classes provide appropriate
  3. support functions.  This function multiply() has the same effect
  4. as the friend function mpy().  However, it must call member
  5. functions getnum(), getdenom(), getelement(), and setelement() to
  6. access data members of the two classes.  The use of a friend
  7. function eliminates the overhead of calling such member functions.
  8.