#include "ThisExample.h" #include using namespace std; //***************************************** //set value of object * //***************************************** void Example::setValue(int x) { this->x = x; //Note the explicit use of the this pointer } //***************************************** //get value of object * //***************************************** int Example::getValue() { return x; //Note the implicit use of a pointer to the object calling getValue(). } //***************************************** // print address and value * //***************************************** void Example::printAddressAndValue() { cout << "The object at address " << this << " has " << "value " << this->x << endl; }