The type of the this
pointer depends on the type of the object and whether the member function in which this
is used is declared const
. For example, in a non-const
member function of class Employee
, the this
pointer has the type Employee *
. In a const
member function, the this
pointer has the type const Employee *
.