derived class is friend class to base class
I saw a code in which derived class is friend class of base class. I did not understand it's purpose. We can access all the fun.s and var.s of base class in derived class (since it is friend to base), if we want the total control of base then why can't we make every thing as protected , instead of saying derived is friend to base?
and one more doubt is how friend is implemented internally? means how it is represented in object table?
|All times are GMT +5.5. The time now is 00:01.|