高手帮看一下我这个C++怎么不能运行

来源:百度知道 编辑:UC知道 时间:2024/05/05 10:12:16
#include<string.h>
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
enum bool{false,true};

template<class T>
struct quenode
{
T nodedata;
quenode * next;
};
template<class T>
class queue
{
protected:
int quesize;
quenode<T> * head;
quenode<T> * tail;
bool allocateeror;
queue ©(queue &q);
public:
queue();
queue(queue &q)
{head=NULL;tail=NULL;copy(q);}
~queue()
{clearque();}
bool getallocateerror()
{return allocateerror;}
void push(T &);
bool pop(T &);
bool isempty()
{return (quesize==0)? true:false;}
void clearque();
queue &operator=(queue &q)

{copy(q);
return * this;
}
};

template <class T>
queue<T>::queue()

//还剩最后一个错误没解决-_-#

#include<string.h>
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>

template<class T>
struct quenode
{
T nodedata;
quenode * next;
};
template<class T>
class queue
{
protected:
int quesize;
quenode<T> * head;
quenode<T> * tail;
bool allocateeror;
public:
queue();
queue(queue &q)
{head=NULL;tail=NULL;copy(q);}
~queue()
{clearque();}
bool getallocateerror()
{return allocateerror;}
void push(T &);
bool pop(T &);
bool isempty()
{return (quesize==0)? true:false;}
void clearque();
queue &operator=(queue &q)

{copy(q);
return * this;
}
};

template <class T>
queue<T>::queue()
{
quesize=0;
allocateerror=false;
hea