92页E7
来源:互联网 发布:数据库课程设计选题 编辑:程序博客网 时间:2024/04/28 03:56
const int maxqueue=10;
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 front ,rear;
Queue_entry entry[maxqueue];
bool is_empty;
};
{
rear=-1;
front=0;
is_empty=true;
}
bool Queue::empty()const
{
return is_empty;
}
Error_code Queue::append(const Queue_entry&item)
{
if{empty()}
return underflow;
if{rear==front}is_empty=true;
front=((front+1)==maxqueue)?0:(front+1)
return success;
}
Error_code Queue::retrieve(Queue_entry&item)const;
{
if{empty()}return underflow;
item =entry[front];
return success;
}
- 92页E7
- 92页 E7
- E7
- E7
- E7
- E7
- E7
- E7
- E7
- E7
- E7
- e7
- E7
- E7
- E7
- E7
- E7
- 诺基亚E7
- 详解SQL Server连接(内连接、外连接、交叉连接)
- 名人面对面之David Anderson-看板
- 商品类别的标签
- 设置eclipse启动时手动选择工作空间
- android TextView 显示HTML
- 92页E7
- javascript深入了解匿名函数和闭包
- TortoiseSVN使用简介
- django-3
- Java DNS cache 时效设置备忘
- JVM监控工具介绍
- python——urllib模块
- HDU1077-圆覆盖点的个数
- C#中创建、打开、读取、写入、保存Excel的一般性代码