this
Pointerthis
PointerWhen calling a member function on an object, the compiler implicitly passes the object's address as an argument.
The compiler internally declares a pointer inside the member function to store this address.
This pointer is called the this
pointer.
It is a constant pointer (i.e., it cannot change which object it points to).
General syntax:
ClassName *const this;
Member functions inside a class are classified into: