adspace
If dog is a friend of boy, and terrier derives from dog, is terrier a friend of boy?
Answer Posted / Rajvir Kumar
No, terrier is not a friend of boy by default. Friendship is not inherited in C++. You would need to explicitly make Terrier a friend of Boy if you wanted that relationship.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers