A friend of a class can access nonpublic members of that class.
Pros:
- For functions that are part of the interface while not a member of the class, they can access the non
publicmembers of that class.
Cons:
- If the implementation of the class changes over time, its friend may also requiring changes.