shivasoni
Marked 2 years 6 months ago onto What Is Friend Function in C++ | DataTrained
Source: https://www.tumblr.com/offpagedata21/703225252997709824/what-is-friend-funct...
Non-member actions of a class will not have accessibility to another class's secret data. There may be times when we need two classes to share some methods and data members. In such a situation, we may declare the function a buddy of these classes, allowing it to access the classes' secret and protected data members. In this post, we'll look at how to add a non-member function to a class as a friend. In this blog, we will help you understand what is friend function.
Category:
Comments
Leave your comment below