摘要: #include#include#include"Stack.h"const int maxstack=31;enum Error_code{success,overflow,underflow};typedef int Stack_entry;class Stack{bool empty() const;Error_code copy_stack(Stack&dest,Stack&source);private:int count;Stack_entry[maxstack];};bool Stack::copy_stack(Stack&dest,c 阅读全文
posted @ 2013-08-29 20:30 XTQ 阅读(155) 评论(0) 推荐(0)
摘要: #include#includeusing namespace std;const int maxqueue=30;enum Error_code{success,underflow,overflow};typedef int Queue_entry;class Queue{public:Queue();bool empty()const;Error_code serve();Error_code append(const Queue_entry&item);Error_code retrieve(Queue_entry&item)const;protected:int cou 阅读全文
posted @ 2013-08-29 20:29 XTQ 阅读(178) 评论(0) 推荐(0)