this Pointerthis pointer holds the address of the current object. In simple words, you can say that this pointer points to the current object of the class. There can be three main usages of this keyword in C++. ● It can be used to refer to a current class instance variable. ● It can be used to pass the current object as a parameter to another method. ● It can be used to declare indexers. Let’s take an example to understand this concept. #include using namespace std; class mobile{ string model; int year_of_manufacture; public: void set_details(string model, int year_of_manufacture){ this->model = model; this->year_of_manufacture = year_of_manufacture; } void print(){ cout << this->model << endl; cout << this->year_of_manufacture << endl; } }; int main() { mobile redmi; redmi.set_details(“Note 7 Pro”, 2019); redmi.print(); } Output: 1 Note 7 Pro 2019 Here you can see that we have two data members model and year_of_manufacture. In member function set_details(), we have two local variables with the same name as the data members’ names. Suppose you want to assign the local variable value to the data members. In that case, you won’t be able to do until unless you use this pointer because the compiler won’t know that you are referring to the object’s data members unless you use this pointer. This is one of example where you must use this pointer. 2