Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!husc6!rutgers!att!ulysses!andante!alice!ark From: ark@alice.UUCP (Andrew Koenig) Newsgroups: comp.lang.c++ Subject: Re: derivation from structs Message-ID: <9355@alice.UUCP> Date: 14 May 89 15:02:55 GMT References: <7103@saturn.ucsc.edu> <9353@alice.UUCP> <7138@saturn.ucsc.edu> Organization: AT&T Bell Laboratories, Liberty Corner NJ Lines: 42 In article <7138@saturn.ucsc.edu>, daniel@saturn.ucsc.edu (Daniel Edelson) writes: -> So this means that given -> -> class X { /* stuff */ }; -> -> saying -> -> struct Y : X { /* more stuff */ }; -> -> is precisely equivalent to saying -> -> struct Y : public X { /* more stuff */ }; -> -> and given -> -> struct X { /* stuff */ }; -> -> saying -> -> class Y : X { /* stuff */ } -> -> is precisely equivalent to saying -> -> class Y : private X { /* stuff */ } -> -> Correct? Correct, with one implementation note: if you say class Y : X { /* stuff */ }; cfront 2.0 will give you a warning. Too many people are under the misapprehension that it means the same as class Y : public X { /* stuff */ }; so we want to encourage people to say `public' or `private' explicitly. -- --Andrew Koenig ark@europa.att.com