-
-
-
-
-
-
-
-
-
-
- #ifndef ARRAY_STACK_H
- #define ARRAY_STACK_H
- #include <iostream>
-
- const int STACK_CAPACITY=1024;
- typedet int elementType;
-
- class Stack
- {
- public:
- Stack( );
- bool empty( ) const;
- void display( osteam & out ) const;
- elementType top( ) const;
- void push( const elementType& value );
- void pop( );
-
- private:
- elementType m_array[ STACK_CAPACITY ];
- int m_size;
- int m_top;
-
- };
-
- ostream& opeartor <<(ostream & out,Stack& sstack ) ;
-
-
- #endif