|
i = obj.i
======
The obj.i on the right can be used directly
Is determined by the process of class domain name resolution,
Inside the member function, when parsing the name, first look at the local domain of the function, and then the entire class domain (they can be accessed without distinguishing between public, private, and protected)
The grammatical rules of C++, the compiler implements it like this, just understand |
|