stack.h

来自「我学习C++ Primer Plus过程中写下的课后作业的编程代码」· C头文件 代码 · 共 25 行

H
25
字号
// stack.h
#ifndef STACK_H_
#define STACK_H_

typedef struct customer Item;

struct customer {
	char	fullname[35];
	double	payment;
};

class Stack {
private:
	enum	{ MAX = 10 };		// Stack 容量
	Item	items[MAX];
	int		top;
public:
	Stack();
	bool	ismpty()const;
	bool	isfull()const;
	bool	push(const Item & item);
	bool	pop (Item & item);
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?