Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!sol.ctr.columbia.edu!ira.uka.de!tmipi4!fuchs From: fuchs@tmipi4.telematik.informatik.uni-karlsruhe.de (Harald Fuchs) Newsgroups: comp.lang.c++ Subject: Re: Why just public, protected, and private? Keywords: protection categories, modularity Message-ID: Date: 10 Feb 91 15:33:12 GMT References: <1991Feb9.021746.13835@xanadu.com> <3811@lupine.NCD.COM> Sender: news@ira.uka.de (USENET News System) Organization: University of Karlsruhe, FRG Lines: 19 rfg@NCD.COM (Ron Guilmette) writes: >In article <1991Feb9.021746.13835@xanadu.com> ravi@xanadu.com (Ravi Pandya) writes: >>For some strange reason, C++ allows private messages to be sent either >>to this or to another compatible object, but protected messages can >>only be sent to this. >I don't have my copy of E&S handy, but I believe that your statement is >incorrect. Me too. I think what Ravi meant was the following: you can call private member functions of other objects _of the same type_ (because the unit of protection in C++ is the class rather than the instance), but you can call protected member functions (in the base type) only for _this_ object, not for other objects of the base type. -- Harald Fuchs *gulp*