Everything About ___
Live briefing

Everything about Friend class

Object relationship in programming language

A friend class in C++ can access the private and protected members of the class in which it is declared as a friend. A significant use of a friend class is for a part of a data structure, represented by a class, to provide access to the main class representing that data structure. The friend class mechanism allows to extend the storage and access to the parts, while retaining proper encapsulation as seen by the users of the data structure. Wikipedia →

🧭 Start here: a 6-step reading path

  1. Read the overview: Friend classA 5-minute orientation
  2. Skim a recent paper: Reassessing the Strength of a Class of Wigner’s Friend No-Go TheoremsInfluential work since 2022
  3. Pick up a classic book: Edvard MunchThe most-reprinted book on the subject
  4. Read the landmark paper: ‘Alcohol is my friend’: Young middle class women discuss their relationship with alcoholCited 56 times
  5. Go sideways: Variadic templateA closely related topic
  6. Go sideways: Template (C++)A closely related topic

📖 Definitions

No dictionary entry for this exact phrase.

🗂️ The subject at a glance

  1. Example
  2. Encapsulation
  3. Alternatives
  4. Properties

🏆 Landmark papers (most cited)

🆕 Influential since 2022

📚 Books worth reading

Ranked by number of editions on Open Library, a rough measure of how lasting a book is.

🔗 Related topics