第二章 栈

来源:互联网 发布:手机安易数据恢复软件 编辑:程序博客网 时间:2024/05/17 01:14

E2.b. 使用Stsck方法和一个临时的Stack,从Stack source中抽取元素并将每个元素加入到Stack dest中,Stack source

对不起老师 不太会 打一段前面的代码吧。。

class Extended_stack {

public:

Extended_stack();

Error_code pop();

Error_code push (Stack_entry item);

Error_code top(Stack_entry &item) const;

bool empty() const;

void clear();

bool full() const;

int size()const;

private:

int top;

Stack_entry entry[maxstack];

}

原创粉丝点击