
Appendix A ◾ 341
e this pointer claries that the eld being referenced is a data member
of the object through which the function was invoked. Example A5a shows
the implementation code for a second method declared in the hitCount
class, where this method has a passed parameter with the same name as a
data member. Like other C++ pointers, the this pointer must be derefer-
enced rst before accessing any data eld of its object. Again the derefer-
enced pointer must be put is parentheses because eld access, “.”, has higher
precedence than “*”. An equivalent, and more readable, syntax is achieved
using the -> operator. us, “(* t h i s).