From -2871354262879018999 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f78e5,816731d0da79d001 X-Google-Attributes: gidf78e5,public From: Kannan Chellappan Subject: Re: Just a simple question Date: 1998/07/27 Message-ID: <35BC90DF.F22950F5@nmasd.bel.alcatel.be>#1/1 X-Deja-AN: 375439883 Approved: Fergus Henderson Content-Transfer-Encoding: 7bit References: <35BC433E.41C6@dune.gia.rwth-aachen.de> Organization: Wipro X-Original-Date: Mon, 27 Jul 1998 16:38:24 +0200 X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUANbzt2+EDnX0m9pzZAQFElwF/fnRV3tcGt9JVPtKJ0bQ3K++h+Wllm2Xh rAdO9oX6pFoNezPnWzkEVWhKI5bzTPex =rmCm Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.std.c++ Norbert Berzen wrote: > Hello, > > can someone tell me if the following is well formed c++: > > struct Outer { > > struct Inter { > > struct Inner { > > int i; > > }; > > }; > > struct Other : public Inter::Inner { > > // empty > > }; > > }; > > int > f (Outer::Other *op) > { > op -> Inter::Inner::i = 0; > } > I dont see any problem. The structure Inner can be accessed only through Inter (as Inner is in the scope of Inter) and the structures Other and Inter are in the same scope (that of Outer). Did you face any problems ? --- [ 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://reality.sgi.com/austern_mti/std-c++/faq.html ]