controlled inheritance test question


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]

Posted by shannon on November 14, 2001 at 22:19:30:

I just wanted to clarify..in Mr. Barnette's class today we had a discussion about what happens to protected members of base class B when derived class D inherits them with public inheritance-in the notes it says:
for public inheritance:
public members of B become public in D
protected members of B become private in D, accessible to members and friends of D and classes derived from D
private members of B are inaccessible to D

But in class people were saying that with regards to protected members of B, that protected members of B become protected members of D, accessible to members and friends of D and classes derived from D.

That second explanation from class makes more sense, but I wanted to clarify which one is right. Please let me know-thanks.


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]