填空题

下面是一个栈类的模板,其中push函数将元素i压入栈顶,pop函数弹出栈顶元素。栈初始为空,top值为0,栈项元素在stack[top-]中,在下面横线处填上适当语句,完成栈类模板的定义。
template<class T>
class Tstack
enumsize=1000;
T stack[size];
int top;
public:
Tstack():top(0)
void push(const T &i)
if(top<size)
stack[top++]=i;

Tpop()
if(top==0)exit(1);//栈空时终止运行
return______;

【参考答案】

stack[--top]、stack[top--1]或stack[top=top-1]