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

  1. You can declare a class to be a friend of another class, as shown
  2. here.  The members of a Weather object can store and extract
  3. information such as temperature, rainfall, and hours of sunlight.
  4. Because the GreenHouse class is a friend of the Weather class, all
  5. member functions of the GreenHouse class can access all data
  6. members and can call member functions of the Weather class.  Two
  7. classes cannot be friends of each other.
  8.