stack.h
来自「数据结构与程序设计教材源码 数据结构与程序设计教材源码」· C头文件 代码 · 共 26 行
H
26 行
template <class Stack_entry>
struct Stack_node {
Stack_entry entry;
Stack_node<Stack_entry> *next;
Stack_node();
Stack_node ( Stack_entry item, Stack_node<Stack_entry> *add_on = NULL );
};
template <class Stack_entry>
class Stack {
public:
Stack();
bool empty() const;
Error_code push(const Stack_entry &item);
Error_code pop();
Error_code top(Stack_entry &item) const;
~Stack();
Stack (const Stack<Stack_entry> &original);
void operator =(const Stack<Stack_entry> &original);
protected:
Stack_node<Stack_entry> *top_node;
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?