摘要:
C#队列的循环实现:View Code class MyQueue <T> { private const int MAXLIMIT = 10; private int count; private int rear, front; private T[] entry = new T[MAXLIMIT]; public MyQueue() { count = 0; rear = MAXLIMIT - 1; front = 0; ... 阅读全文
摘要:
C++队列的循环实现:View Code const int MAXQUEUE = 10;template<class T>class ZtkQueue {public: ZtkQueue(); bool empty() const; ErrorCode append(const T &x); ErrorCode serve(); ErrorCode retrieve (T &x)const; bool full() const; int size() const; void clear(); ErrorCode serve_and_ret... 阅读全文