home *** CD-ROM | disk | FTP | other *** search
- You can declare a class to be a friend of another class, as shown
- here. The members of a Weather object can store and extract
- information such as temperature, rainfall, and hours of sunlight.
- Because the GreenHouse class is a friend of the Weather class, all
- member functions of the GreenHouse class can access all data
- members and can call member functions of the Weather class. Two
- classes cannot be friends of each other.
-