20.4 Friends
- Grants access to non-public members to another function or non-derived
class
- Declare other entity as a friend in class definition
- Each friend must be explicitly named
- Granting friendship to a class grants access to all of its member
functions
- Still dangerous, but more precise mechanism
prev
|top
|next