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


Please Help Members By Posting Answers For Below Questions

What character terminates all character array strings a) b) . c) END

1397


Can union be self referenced?

1267


How c functions prevents rework and therefore saves the programers time as wel as length of the code ?

1165


daily Routine of father

1485


What is the latest version on c++?

1209