<<< | Index | >>> |
Within a member function, the this keyword is a pointer to the current object.
Current object is the object through which the function was called.
|
class Point { // member variables int m_x; int m_y; public: // member function void adjust( int x, int y ) { this->m_x += x; // Ok, but redundant this->m_y += y; } }; |
<<< | Index | >>> |