when a class A is inherited publicly by another class B then all the protected members and public member of class A become the protected members and public members of class B respectively.
the area in which properties of base class are present is called virtual area of class B.
So member function of class B can access the member function of class A band object of class B can access all the function of class b and we known that only function can access private data member of class.
the area in which properties of base class are present is called virtual area of class B.
So member function of class B can access the member function of class A band object of class B can access all the function of class b and we known that only function can access private data member of class.
No comments:
Post a Comment