encapsulation

arun s 1986.arun at gmail.com
Tue Mar 13 10:26:28 PDT 2007


class A { 
     private int c=0;  
}


void main() {
      A a = new A();
      printf("%d",a.c);
}

consider the above code snippet..... y there is no error in printf statement 
a.c , since attribute "c" is private ???? 



More information about the Digitalmars-d mailing list