1 2 3 4 5 6 7 8 9 10 11 12

If a member function is large, then move the definition outside the class, leaving behind the function prototype:
DataType FunctionName (ParameterList);//prototype

void push (int );

// just parameter type in prototype

indicate the class to which the moved member function belongs as follows:

DataType ClassName :: FunctionName (Parameter List)
{// function body}
int Stack :: pop () {// function body}

When you call (invoke) the member function, then use the class member operator ( .a period), to identify the class object on which the function is to work. The difference would be

OrdinaryFunction (ClassArgument, OtherArguments)
reverse (s1, 20);

ClassArgument.memberFunction (OtherArguments)
s1.reverse (20);

24-Mar-98

Page 2

TAM/C201