I have to write template class that implements queue, this is the header file, I get error on this line :
Node * front;
the error is :use of class template requires template argument list,
#include <iostream>
#pragma once
using namespace std;
typedef int Error_code;
#define SUCCESS 0
#define OVERFLOW -1
#define UNDERFLOW -2
template <class T>
class Node{
T item;
Node * next;
Node(){item=0; next=NULL;}
Node(T n){item=n; next=NULL:}
};
template <class T>
class queue
{
protected:
Node * front; // pointer to front of Queue
Node * rear; // pointer to rear of Queue
int count;
public:
queue(); // create queue
~queue();
bool isempty();
bool isfull();
Error_code serve() ;
Error_code retrieve(T &item);
Error_code append(T item);
};