1.

I Have Declared A Derived Class From A Base Class, But I Can't Access Any Of The Base Class Members With The Derived Class Function.?

Answer»

Derived CLASSES DO NOT get ACCESS to PRIVATE members of a base class. In ORDER to access members of a base class, the base class members must be declared as either public or PROTECTED. If they are public, then any portion of the program can access them. If they are protected, they are accessible by the class members, friends, and any derived classes.

Derived classes DO NOT get access to private members of a base class. In order to access members of a base class, the base class members must be declared as either public or protected. If they are public, then any portion of the program can access them. If they are protected, they are accessible by the class members, friends, and any derived classes.



Discussion

No Comment Found