void Swap ( int&, int& );
void (*pFunc) (int&, int& );
...
pFunc = Swap;
...
PrintVals ( pFunc, valOne, valTwo );
...
}
void PrintVals ( void (*pFunc)(int &, int & ), int &x,
int&y )
{
cout << “x: “, <<
x << “y: “ << y << endl;
pFunc ( x, y );
cout << “x: “, <<
x << “y: “ << y << endl;
}