MCQs>IT & Programming>C++>Is this program correct? class A { int a; friend class B; }; class B { friend class C; }; class C { void foo() { A a; a.a = 4; } };
C++ MCQs
Is this program correct? class A { int a; friend class B; }; class B { friend class C; }; class C { void foo() { A a; a.a = 4; } };
Answer
Correct Answer: No, friend declarations are not transitive
Explanation:
Note: This Question is unanswered, help us to find answer for this one