I had never heard of a friend class until I reviewed some exam questions for a certificate focusing on C#. I thought it was a trick question, a fake class type, at first because it had never been used nor mentioned over the entire course.
Is their use common in the real world and across languages?
Thank you HonFu and Nagendra for your explanation and the link.
The description somehow reminds me of a nested class.
I still have not grasped how exactly it works. In the examples (link), the friend class looks on the one hand like a member of the "host" class, on the other hand the friend class is called on its own outside that class and not as a class member. I will have to re-read the article and Experiment with that some time. :-)