home *** CD-ROM | disk | FTP | other *** search
- It is usually possible to replace a friend function with a
- function that is not a friend, if the classes provide appropriate
- support functions. This function multiply() has the same effect
- as the friend function mpy(). However, it must call member
- functions getnum(), getdenom(), getelement(), and setelement() to
- access data members of the two classes. The use of a friend
- function eliminates the overhead of calling such member functions.
-