Homework/HW03/Stack.cc
int Stack::top()
{ 
    if (!isEmpty()) 
        return *begin();
    else 
    {
        cout << "attempt to access the top of an empty stack" << endl;
        exit(1);
    }  
}
// Inspect the value of the top object.
Inspect the value of the top object.
Inspect the value of the top object .
int Stack::top()
{ 
    if (!isEmpty()) 
        return *begin();
    else 
    {
        cout << "attempt to access the top of an empty stack" << endl;
        exit(1);
    }  
}
int Stack :: top ( ) { if ( ! isEmpty ( ) ) return * begin ( ) ; else { cout << " " << endl ; exit ( 1 ) ; } }
Inspect the value of the top object.
Inspect the value of the top object .