0
write a c++ programme which demonstrate the use of friend class?
using friends class
1 Antwort
0
A friend class is a class that has access to members or methods from another class that it would normally not have access to.
The basic look is like so:
class A
{
};
class B
{
friend class A; // Class A is a friend of B, giving A access to B's private members/methods
};