下面程序是一个堆栈的类模板,在横线处填上适当语句,完成类模板的定义。 define MAXSIZE 100 template <class T> class Stack { T s[MAXSIZE]; int top; public: stack() { top=1; } void push(T newValue) { if(top<MAXSIZE) { top=top+1; s[top]=newValue; } else cout<<'堆栈满,无法进栈'<<end1; } void pop(); }; 【 】 { if(top>1) { cout<<s[top]<<end1; top=top-1; } else cout<<'堆栈空! '<<end1; }