queue.h
#ifndef QUEUE_H_
#define QUEUE_H_
template<class Type>
class Queue{
private:
enum {Q_SIZE = 10};
class Node{
public:
Type data;
Node * next;
Node(const Type data) : data(data), next(0) {}
};
Node *front;
Node *rear;
int curSize;
int maxSize;
public:
Queue(int size = Q_SIZE);
~Queue();
bool isFull() const;
bool isEmpty() const ;
bool enQueue(const Type data);
bool deQueue();
void tarverseQueue() const;
};
#endif#ifndef QUEUE_H_
#define QUEUE_H_