Prerequisite: Friend Class in C++A friend class can access private and protected members of other classes in which it is declared as a friend. It… Read More
Tag Archives: C++-friend keyword
Predict the output the of following program. #include <iostream> using namespace std; class B; class A { int a; public: A():a(0) { } void… Read More