Introduction to OOP: Chapter 3: Classes and Methods:
[next]
[previous]
[audio]
[real]
[text]
Parts of a Member Function
-
A return type - just as in C functions (``int'' assumed if none given)
-
A function name - divided into class name and function name
(analogy - personal name and family name)
-
argument list - list both types and argument names
-
body - can invoke other member functions directly
int Card::rank()
{
return r;
}
Intro OOP, Chapter 3, Slide 23