Re: Visibility of variables in struct nested within a class

2013-07-08 Thread bearophile
Please show a complete very little program, and maybe someone will try to help you. I've seen there is code in another (broken) thread, so please ignore this request. Bye, bearophile

Re: Visibility of variables in struct nested within a class

2013-07-08 Thread bearophile
Charles Hixson: Is this the way things are supposed to happen? (Changing the struct to a class is an OK patch, but I don't understand why it should either work or be necessary.) Please show a complete very little program, and maybe someone will try to help you. (Eventually it's a good ide

Re: Visibility of variables in struct nested within a class

2013-07-05 Thread Charles Hixson
On 07/05/2013 02:52 PM, H. S. Teoh wrote: On Fri, Jul 05, 2013 at 01:43:27PM -0700, Charles Hixson wrote: On 07/05/2013 11:25 AM, H. S. Teoh wrote: On Fri, Jul 05, 2013 at 11:19:53AM -0700, Charles Hixson wrote: I have a class that defines a variable (root). Within it I have nested a struct.

Re: Visibility of variables in struct nested within a class

2013-07-05 Thread H. S. Teoh
On Fri, Jul 05, 2013 at 01:43:27PM -0700, Charles Hixson wrote: > On 07/05/2013 11:25 AM, H. S. Teoh wrote: > >On Fri, Jul 05, 2013 at 11:19:53AM -0700, Charles Hixson wrote: > >>I have a class that defines a variable (root). Within it I have > >>nested a struct. If I refer to that variable withi

Re: Visibility of variables in struct nested within a class

2013-07-05 Thread John Colvin
On Friday, 5 July 2013 at 21:20:27 UTC, John Colvin wrote: On Friday, 5 July 2013 at 20:47:45 UTC, Charles Hixson wrote: I don't mean to come off as a formatting fascist, but you'll get more responses from busy people if you format in a more familiar way, e.g. class Outer { int inn;

Re: Visibility of variables in struct nested within a class

2013-07-05 Thread John Colvin
On Friday, 5 July 2013 at 20:47:45 UTC, Charles Hixson wrote: I don't mean to come off as a formatting fascist, but you'll get more responses from busy people if you format in a more familiar way, e.g. class Outer { int inn; struct InnerS { int able; void setable(

Re: Visibility of variables in struct nested within a class

2013-07-05 Thread Charles Hixson
On 07/05/2013 11:25 AM, H. S. Teoh wrote: On Fri, Jul 05, 2013 at 11:19:53AM -0700, Charles Hixson wrote: I have a class that defines a variable (root). Within it I have nested a struct. If I refer to that variable within the struct I get the message: cbt2.d(760): Error: this for root needs to

Re: Visibility of variables in struct nested within a class

2013-07-05 Thread H. S. Teoh
On Fri, Jul 05, 2013 at 11:19:53AM -0700, Charles Hixson wrote: > I have a class that defines a variable (root). Within it I have > nested a struct. If I refer to that variable within the struct I > get the message: > cbt2.d(760): Error: this for root needs to be type BTree not type Path > > If

Visibility of variables in struct nested within a class

2013-07-05 Thread Charles Hixson
I have a class that defines a variable (root). Within it I have nested a struct. If I refer to that variable within the struct I get the message: cbt2.d(760): Error: this for root needs to be type BTree not type Path If I change the struct to a class, the error goes away, but I'd prefer to us