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.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here