**fig3_47.txt** /* 1*/ static const Default_Size = 100; /* 2*/ template /* 3*/ class Stack /* 4*/ { /* 5*/ private: /* 6*/ // The stack is array based. /* 7*/ unsigned int Full_Stack; /* 8*/ int Top_Of_Stack; /* 9*/ Element_Type *Stack_Array; /*10*/ Stack( const Stack & Value ); /*11*/ public: /*12*/ // Constructors. /*13*/ Stack( unsigned int Max_Size = Default_Size ); /*14*/ // Destructor. /*15*/ ~Stack( ) { delete [ ] Stack_Array; } /*16*/ // Operators. /*17*/ const Stack & operator = ( const Stack & Value ); /*18*/ // Member functions. /*19*/ void Push( const Element_Type & X ); /*20*/ void Pop( ); /*21*/ const Element_Type & Pop_And_Top( ); /*22*/ const Element_Type & Top( ) const; /*23*/ void Make_Empty( ); /*24*/ int Is_Empty( ) const /*25*/ { return Top_Of_Stack == -1; } /*26*/ int Is_Full( ) const /*27*/ { return Top_Of_Stack == Full_Stack - 1; } /*28*/ };