正在加载图片...
∥/顺序循环队列的模板类接口定义以及基本运算的实现代码 #includesiostream. h> enum Error code success, overflow, underflow can land, can depart, fail y const int maxqueue =10; //small value for testing template <class Queue entry> class Queue i public: Queue() bool empty const return count==0; I Error code serve Error code append(const Queue entry &item) Error code retrieve(Queue entry &item )const//顺序循环队列的模板类接口定义以及基本运算的实现代码 #include<iostream.h> enum Error_code{ success, overflow, underflow, can_land, can_depart, fail }; const int maxqueue = 10; // small value for testing template <class Queue_entry> class Queue { public: Queue( ); bool empty( ) const { return count==0; } Error_code serve( ); Error_code append(const Queue_entry &item); Error_code retrieve(Queue_entry &item) const;
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有