this
¶
Explicit this
Pointer¶
For example to resolve ambiguity: say member are x
and y
(not prefixed with _
)
class point
{
public:
void move(int x, int y)
{
this->x += x;
this->y += y;
}
private:
int x;
int y;
};