c07p353.txt
来自「Data Abstraction & Problem Solving with 」· 文本 代码 · 共 34 行
TXT
34 行
// ********************************************************// Header file QueueA.h for the ADT queue.// Array-based implementation.// ********************************************************#include "QueueException.h"const int MAX_QUEUE = maximum-size-of-queue;typedef desired-type-of-queue-item QueueItemType;class Queue{public:// constructors and destructor: Queue(); // default constructor // copy constructor and destructor are // supplied by the compiler// Queue operations: bool isEmpty() const; void enqueue(QueueItemType newItem) throw(QueueException); void dequeue() throw(QueueException); void dequeue(QueueItemType& queueFront) throw(QueueException); void getFront(QueueItemType& queueFront) const throw(QueueException);private: QueueItemType items[MAX_QUEUE]; int front; int back; int count;}; // end Queue class// End of header file.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?