Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!utoday!comeau From: comeau@utoday.UUCP (Greg Comeau) Newsgroups: comp.lang.c++ Subject: Re: Private base class Message-ID: <1144@utoday.UUCP> Date: 11 Jan 90 16:58:15 GMT References: <1533@castle.ed.ac.uk> Reply-To: comeau@.UUCP (Greg Comeau) Organization: UNIX Today!, Manhasset, NY Lines: 16 In article <1533@castle.ed.ac.uk> sam@lfcs.ed.ac.uk (S. Manoharan) writes: >class base { public: int a; void f() {} }; >class derived: base { public: base::a; base::f; }; >void main() { derived x; x.a = 0; x.f(); } >Compiling cfront version 1.2.1 gives "error: a is from private base class", >...Where have I gone wrong then? Could someone help me? > I think you're stuck with a 1.2.1 nuance. Your code should work fine with a 2.0 cfront. -- Greg, Comeau Computing, 91-34 120th Street, Richmond Hill, NY, 11418 Producers of CC C++, SysAdm columnist for UNIX Today!, Microsoft Systems Journal (C programming), + others. Also, BIX c.language & c.plus.plus conf. moderator. Here:attmail!csanta!greg / BIX:comeau / CIS:72331, 3421 / voice:718-849-2355