#include "mydefs2a.h" #include // Linked list implementation of stacks. int_stack :: node* int_stack::new_node(int d, node* n) { node* t = new node; assert( t ); t -> data = d; t -> next = n; return( t ); } int int_stack :: pop() { assert( !isempty() ); int t = top -> data; node* oldtop = top; top = top -> next; delete oldtop; return t; }