The private data

18.The following program shows an error message due to accessing a private data of the base class by the public member function of the derived class via private inheritance. Because of the private derivation, the base class members cannot be accessed by the public members of the derived class.

19.The following program tries to access the private data of the base class by the public member function of the derived class via public inheritance through friendship.

WhatsApp
Hello! Need help with your assignments?

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

🛡️ Worried About Plagiarism? Run a Free Turnitin Check Today!
Get peace of mind with a 100% AI-Free Report and expert editing assistance.

X