template<class TYPE> class Stack { public: Stack(); ~Stack(); void push(const TYPE &); TYPE& top(); const TYPE& top() const; void pop(); bool emtpy() const; size_t size() const; private: deque<TYPE> m_deq; };
时间: 2024-10-24 07:01:44
template<class TYPE> class Stack { public: Stack(); ~Stack(); void push(const TYPE &); TYPE& top(); const TYPE& top() const; void pop(); bool emtpy() const; size_t size() const; private: deque<TYPE> m_deq; };