home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!purdue!yuma!csn!evolving.com!jcm
- From: jcm@evolving.com (Jack Morrison)
- Newsgroups: comp.lang.c++
- Subject: Re: Inherited nested classes?
- Message-ID: <1992Aug28.164813.51739@evolving.com>
- Date: 28 Aug 92 16:48:13 GMT
- References: <GIROD.92Aug25095844@node_262d6.tele.nokia.fi>
- Organization: Evolving Systems, Inc.
- Lines: 19
-
- I've just run into what I think is a related problem, but maybe a bit simpler.
- Here's the stripped-down code:
-
- class C {
- private:
- struct A { int x; };
- struct B { A a1; };
- A a2;
- };
-
- The AIX 3.2 xlC compiler complains about the struct B declaration, saying
- it can't access private type C::A. I guess I understand this, since B is
- basically a (nested) class. Making A protected doesn't seem to help, which
- apparently means B is not a subclass of C. Making A *public* works, but I
- didn't really want to bother anyone outside the class with the struct type.
-
- --
- "How am I typing? Call 1-303-969-3354" jcm@evolving.com
- Jack C. Morrison, Evolving Systems, Inc. Lakewood, Colorado
-