📄 stack.h
字号:
#ifndef STACK_H_
#define STACK_H_
enum Error_code{success,underflow,overflow};
typedef int Stack_entry;
const int maxstack =3;
class Stack {
public:
Stack();
bool empty() const;
Error_code pop();
Error_code top(Stack_entry &item) const;
Error_code push(const Stack_entry &item);
void clear();
bool full() const ;
int size() const;
private:
int count;
Stack_entry entry[maxstack];
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -