******** fig3.45 ********** element_type top( STACK S ) { if( is_empty( S ) ) error("Empty stack"); else return S->next->element; }