Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!rochester!kodak!ektools!randolph From: randolph@ektools.UUCP (Gary L. Randolph) Newsgroups: comp.lang.c++ Subject: conflict Message-ID: <1971@ektools.UUCP> Date: 28 Jun 89 20:03:09 GMT Sender: randolph@ektools (Gary L. Randolph) Distribution: usa Organization: Eastman Kodak, Dept. 47, Rochester N.Y. Lines: 54 OK, which is it? Pohl's text (pg. 143): "If a member is transmitted to its derived class as private, this can be altered to public or protected, as in the following: class b{ public: int f; int g; ... }; class d : private b{ protected: int b::g; //g is converted to protected public: int b::f; //f is converted to public ... }; In the same manner, a publicly transmitted member can be explicitly converted to private or protected." -------------------***-------------------- NOW, Lippman's text (pg. 318, 319): Examples of a class hierarchy is given that is set up as: class ZooAnimal //base class Rodent : private ZooAnimal and class Rat : public Rodent ZooAnimal has a public method, inform(), and a protected member, onDisplay(). "The derived class can maintain the inherited member's access level only. The access level cannot be made either more or less restrictive that the level originally specified within the base class. It is illegal, for example, to declare the protected ZooAnimal class member onDisplay within a public section of Rodent or to declare inform() within a protected section." I am NOT looking for fault. Writing a book on C++ cannot be an easy task. I may also be overlooking some detail that makes both texts correct. But right now, all I see is a conflict and I need clarification. Gary