, in every member function
, a pointer called this
is defined to point to the object for which the member function was called. Without the this
pointer, member functions could not be used for linked list
manipulation (among other things).
this is a pointer and not a reference because when it was introduced in C with Classes the language didn't have references.
It is the equivelent of Simula's THIS reference, and is called this rather than self because C++ borrows its terminology from Simula rather than Smalltalk.