From -2220180745198895052 X-Google-Language: ENGLISH,ASCII X-Google-Thread: f78e5,e4551d1072848803 X-Google-Attributes: gidf78e5,public X-Google-ArrivalTime: 2001-12-05 15:15:00 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail From: Valentin.Bonnard@free.fr (Valentin Bonnard) Newsgroups: comp.std.c++ Subject: Re: Omitting the access specifier of a base class Date: Wed, 5 Dec 2001 23:13:55 GMT Approved: Fergus Henderson , moderator of comp.std.c++ Message-ID: <200112050820.JAA11555@brick.ens.fr> References: <3C051430.3AE0E9C2@bawi.org> <3C0632A5.8E2CC809@wizard.net> <3C0ACD92.BEEFE336@bawi.org> X-Trace: mail2news.demon.co.uk 1007594042 mail2news:9741 mail2news mail2news.demon.co.uk X-Complaints-To: abuse@demon.net X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov) X-Newsreader: Flrn (0.5.0pre0 - 10/00) Lines: 33 Xref: archiver1.google.com comp.std.c++:8505 Sungbom Kim wrote: > The most common form is, I think: > > class Derived : public Base > { > public: > // interface for "the general public" > protected: > // interface for derived classes (if any) > private: > // implementation detail > }; > >> > Actually not very much is saved by omitting one keyword, and anyway >> > in most cases 'public' has to be written because the default for >> > classes (declared 'class') are 'private'. >> >> Then declare them as structs. > > You wouldn't change 'class' to 'struct' just to get rid of the > starting "public:" in the above example, would you? I would. --�VB --- [ comp.std.c++ is moderated. To submit articles, try just posting with ] [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ] [ --- Please see the FAQ before posting. --- ] [ FAQ: http://www.research.att.com/~austern/csc/faq.html ]