Driver program to test above functions
int main ( ) { StackWithMax s ; s . push ( 20 ) ; cout << s . getMax ( ) << endl ; s . push ( 10 ) ; cout << s . getMax ( ) << endl ; s . push ( 50 ) ; cout << s . getMax ( ) << endl ; return 0 ; }