This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
justhomework/ex7/stack.cpp

27 lines
539 B
C++
Raw Normal View History

2021-11-11 12:45:47 +00:00
#include "stack.h"
// template <class T>
// void Stack<T>::push (T const& elem)
// {
// _elems.add(elem);
// }
// template <class T>
// T Stack<T>::pop ()
// {
// if (_elems.getused()) {
// return NULL;
// }
// // 删除最后一个元素
// return _elems.remove_back()
// }
// template <class T>
// T Stack<T>::top () const
// {
// if (_elems.getused()) {
// return NULL;
// }
// // 返回最后一个元素的副本
// return _elems[_elems.getused()-1];
// }