Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!snorkelwacker!mit-eddie!mit-amt!peter From: peter@mit-amt.MEDIA.MIT.EDU (Peter Schroeder) Newsgroups: comp.lang.c++ Subject: Re: Private base class Summary: the original is correct and should work (and does under 2.0)! Message-ID: <1371@mit-amt.MEDIA.MIT.EDU> Date: 11 Jan 90 03:07:05 GMT References: <1533@castle.ed.ac.uk> <4604@helios.ee.lbl.gov> Reply-To: peter@media-lab.media.mit.edu (Peter Schroeder) Organization: MIT Media Lab, Cambridge MA Lines: 38 In article <4604@helios.ee.lbl.gov> beard@ux1.lbl.gov (Patrick C Beard) writes: >In article <1533@castle.ed.ac.uk> sam@lfcs.ed.ac.uk (S. Manoharan) writes: >#Yet another What's-wrong-with-my-code question: ># [code sample deleted] >#Compiling this with CC (cfront version 1.2.1) gives the following >#errors: >#CC test.c: >#"test.c", line 18: error: a is from private base class >#"test.c", line 19: error: f is from private base class >#2 errors > >As it should, you have inherited the base class privately. In other >words, all members, public, protected, or private, are inaccessible >to the derived class. The fix is to declare derived like so: [ "fix" deleted] NO, NO, NO! Now the confusion is perfect! The example should work and does work under 2.0!!!!! Apperently there is a bug in 1.2.1 I do this all over the place in my code. >#BS says "It is possible to declare some, not all, of the public >#members of a base class public memberes of a derived class." >#(page 196) Where have I gone wrong then? Could someone help me? You have not gone wrong. That is the correct quote and your interpretation is correct. >Hope that helps. Sorry, no it doesn't! >- Patrick Beard, Macintosh Programmer (beard@lbl.gov) - Peter peter@media-lab.media.mit.edu