Example of Arrow Operator
class countPointer {public: countPointer(Window * w)
{ count = 0; win = w; } Window * operator->()
{ count++; return win; }private: Window * win; int count;
Window * x = new Window(...); // create the underlying value
countPointer p(x); // create a counting pointer value
p->setSize(300, 400); // invoke method in class window