The this
pointer is a way to access the current instance of particular object. It can be used for several purposes:
- as instance identity representation (for example in comparison to other instances)
- for data members vs. local variables disambiguation
- to pass the current instance to external objects
- to cast the current instance to different type