A non-static member function may be called for an object of
its class type, or for an object of a class derived
from its class type, using the
class member access syntax ([over.match.call]).
A non-static
member function may also be called directly using the function call
syntax ([expr.call], [over.match.call]) from within
its class or a class derived from its class, or
a member thereof, as described below.
In the body of the member function tnode::set, the member names
tword, count, left, and right refer to
members of the object for which the function is called.
Thus, in the
call n1.set("abc",&n2,0), tword refers to
n1.tword, and in the call n2.set("def",0,0), it refers
to n2.tword.
The functions strlen, perror, and
strcpy are not members of the class tnode and should be
declared elsewhere.106
They also affect the function
type of the member function; a member function declared
const is a const member function, a member function
declared volatile is a volatile member function and a
member function declared constvolatile is a
const volatile member function.
[Example 2: struct X {void g()const;
void h()constvolatile;
};
X::g is a const member function and X::h is a
const volatile member function.