Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
0
The most common application is probably this: struct A{ int setX(int x){this->x = x;} int x; }; The 'this' pointer is used to differentiate between a local variable of a member function and class/struct member variable with the same name.
2nd Feb 2017, 3:42 PM
Ettienne Gilbert
Ettienne Gilbert - avatar