**fig3_41.txt** /* 1*/ template /* 2*/ class Stack /* 3*/ { /* 4*/ private: /* 5*/ // The stack is a linked list with no header. /* 6*/ struct Node /* 7*/ { /* 8*/ Element_Type Element; /* 9*/ Node *Next; /*10*/ Node( Element_Type E = 0, Node *N = NULL ) : /*11*/ Element ( E ), Next ( N ) { } /*12*/ }; /*13*/ Node *Stack_Top; /*14*/ Stack( Stack & Value ); // Disabled. /*15*/ public: /*16*/ // Default stack size is meaningless. /*17*/ Stack( unsigned int Max_Size = 100 ) : Stack_Top ( NULL ) { }; /*18*/ // Destructor. /*19*/ ~Stack( ); /*20*/ // Operators. /*21*/ const Stack & operator = ( const Stack & Value ); /*22*/ // Member functions. /*23*/ void Push( const Element_Type & X ); /*24*/ void Pop( ); /*25*/ Element_Type Pop_And_Top( ); /*26*/ const Element_Type & Top( ) const; /*27*/ int Is_Empty( ) const { return Stack_Top == NULL; } /*28*/ };