Science, asked by mandliyapranchal, 4 months ago

In OOP, which of the following functions throws an error when a class is inherited?

Answers

Answered by kiranmoryak
2

Answer:

In C++, friendship is not inherited. If a base class has a friend function, then the function doesn't become a friend of the derived class(es). For example, following program prints error because show() which is a friend of base class A tries to access private data of derived class B.

Similar questions