Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<class T>
- class stack{
- private:
- int top;
- T a[MAX_value];
- public:
- stack():top (-1){}
- void push(T element);
- T pop();
- bool isEmpty();
- void display();
- void getTop();
- };
- void stack::push(T element){
- .......
- }
- T stack::pop(){
- ....
- }
- stack<int> s, or stack<double> s.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement