Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!cornell!rochester!rutgers!att!ulysses!andante!alice!ark From: ark@alice.UUCP (Andrew Koenig) Newsgroups: comp.lang.c++ Subject: Re: derivation from structs Message-ID: <9353@alice.UUCP> Date: 13 May 89 19:26:49 GMT References: <7103@saturn.ucsc.edu> Organization: AT&T Bell Laboratories, Liberty Corner NJ Lines: 28 In article <7103@saturn.ucsc.edu>, daniel@saturn.ucsc.edu (Daniel Edelson) writes: > Does derivation from structs rather than classes default > to public rather than private, as it is for classes? > How about if the struct contains a private part? Saying struct X { /* stuff */ }; is precisely equivalent to saying class X { public: /* stuff */ }; and saying struct Y: X { /* stuff */ }; is precisely equivalent to saying class Y: public X { public: /* stuff */ }; Whether you said struct or class when defining X is invisible to any class derived from X. The only thing that matters is the actual visibilities that result. -- --Andrew Koenig ark@europa.att.com