Jul 16, 2019 in C Plus Plus
Q:

What is this pointer?

1 Answer

0 votes
Jul 16, 2019

The ‘this’ pointer is passed as a hidden argument to all nonstatic member function calls and is available as a local variable within the body of all nonstatic functions. ‘this’ pointer is a constant pointer that holds the memory address of the current object. ‘this’ pointer is not available in static member functions as static member functions can be called without any object (with class name).

Related questions

+2 votes
Jan 21 in C Plus Plus
0 votes
Jun 15, 2020 in C Plus Plus
...