By convention, small but important changes in syntax distinguish member-function calls from calls to ordinary functions. In particular, each member function has one special argument:
For example, to call the volume
functionthe one that is a member
of the box_car
classto work a box_car
object named by a
variable, x
, you write the following:
x.volume ( )
Note that the volume
member function happens to have no ordinary
arguments.