Skip to content

Latest commit

 

History

History
7 lines (5 loc) · 318 Bytes

7.20.md

File metadata and controls

7 lines (5 loc) · 318 Bytes

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 nonpublic members of that class.

Cons:

  • If the implementation of the class changes over time, its friend may also requiring changes.