Lecture overview -- Keyboard shortcut: 'u'  Previous page: Const member functions - const and mutable -- Keyboard shortcut: 'p'  Next page: Inline member functions -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Alphabetic index  Help page about these notes  Course home    Abstraction Mechanisms, Part 1 - slide 24 : 36

Object Self-reference

In non-static member functions, this is a pointer to the object on which the function has been invoked

point.h
Class Point - almost the usual header file.
point.cc
Class Point - a variant with explicit use of this.
prog.cc
A sample use of points, with emphasis on moving.

The use of this in C++ is similar to the use of this in both C# and Java