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
  • 19,566
  • 15
  • 85
  • 160

0 Answers0