#pragma once
#include<iostream>
#include<string>
using namespace std;
template<class T>
class QuNode
{
public:
T data;
QuNode<T>* next;
};
template<class T>
class LinkQueue
{
private:
QuNode<T>* front,*rear;
public:
LinkQueue();
LinkQueue(LinkQueue<T>& s);
~LinkQueue();
int Length();
bool Empty();
void Clear();
bool InQueue(T e);
bool OutQueue(T& e);
bool getHead(T& e);
};
#include"链队列.hpp"
#include<iostream>
#include<string>
using namespace std;
template<class T>
LinkQueue<T>::LinkQueue()
{
this->front = this->rear = new QuNode<T>;
front->next = NULL;
}
template<class T>
LinkQueue<T>::LinkQueue(LinkQueue<T>& s)
{
this->front = this->rear = new QuNode<T>;
QuNode<T>* q = s.front;
while (q != NULL)
{
QuNode<T>* p =