← Back to team overview

yade-dev team mailing list archive

Re: Re : yade crash launching xml

 

> class C 
> {
>     bool b;
> }
> 
> C::C ()
> {
>     bool b=true;//declare b again, is it another b or the same one?!!!
> }
> )
It is a different var; to get the first b, you would have to specify the
scope like C::b. Similarly:

int i=0;
if(a==3){ int i=4; /* another, independent i in the nested scope */  }
// here again, i==0

V.




References