| Thread Previous • Date Previous • Date Next • Thread Next |
> 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.
| Thread Previous • Date Previous • Date Next • Thread Next |