Parts of a Member Function

A member function definition looks very much like an ordinary C function definition. It has a return type and, as in C, the type int is assumed if no other value is given. This is followed by the function name. This is divided into the class name and the function name. You can think of this as being similar to a family name and a given name. This is then followed by an argument list, one that lists both types and argument names. And finally one has a class body. Within the body other member functions can be invoked, and if they are invoked it is not necessary to provide a receiver.

[audio] [real] Text to accompany slide23, in Chapter 3 of An Introduction to Object-Oriented Programming