1. Suppose you have two classess A and B and you want to use any of the method of class A inside class B then you have to use (Inheritance)OOPS otherwise you cannot do it.
2. Concept Of friend functions and friend classes comes only when we want to access private or protected or you can say non public( data members and member functions ) of a class in another class.
No comments:
Post a Comment