class B { protected int a=123; }class A : B { int f(int b) { //int a; // <--- I forgot to write this line ... a = b + 1; // <--- Oops! ... return a; } }
That's why I don't understand, why D allows to refer to member variables and functions without "this". I always use "this" and don't have any problems.
