private class members

Christoph christoph at singewald.at
Fri May 18 16:02:26 PDT 2007


Hi!

Maybe I am wrong, but in normal case this source should not compile,
because I can access private class member outside of the class.
What is wrong?

Here is the code:

class Bar
{
  private int member;
  private int member2;
};

int main()
{

  Bar bar = new Bar();
  bar.member = 10;
  bar.member2 = 11;
 return 0;
}




More information about the Digitalmars-d mailing list