Exploring C++ Friend Functions
What is a Friend? A friend declaration appears within a class and grants a function or another class access to the private and protected members of the class that declares the friend (https://en.cppreference.com/w/cpp/language/friend.html). Points to note: Friend declarations are made within the class, but their specific location is not restricted and is not subject to … Read more