I have a class A. I inherit it to form a class B.
Now if I delcare B as a friend of another class C
What is the relation between A and C.
If B can use any function from A, can C too ??
I couldn't find any article on this particular relation.
class C{
int c;
public:
void func();
};
class B{
int b;
friendclass C;
};
class A : public B{
int a;
};
void C::func(){
A aa;
aa.a = 5;
aa.b = 7;
}
int main(){
C cc;
cc.func();
return 0;
}