0

In this example:

class foo{
    public::
        foo(int x):x(x){
        }
        int x;
    };

My compiler is able to understand that, in x(x), the inner x is the argument and the outer x is the member variable without writing this->.

Is this behaviour a standard one?

Humam Helfawi
  • 18,595
  • 13
  • 73
  • 147

0 Answers0