I'm getting a compile error that I can't figure out. It says:
Queue.h:18:23: error: invalid use of template-name ‘Queue’ without an argument list Queue.h:23:23: error: invalid use of template-name ‘Queue’ without an argument list
Can anyone help?
#if !defined QUEUE_SIZE
#define QUEUE_SIZE 30
#endif
using namespace std;
template <class TYPE> class Queue
{
private:
TYPE *array;
public:
Queue(Queue& other);
Queue();
~Queue();
Queue& operator=(Queue other);
TYPE pushAndPop(TYPE x);
};
template <class TYPE> Queue::Queue()
{
array=new TYPE[size];
}
template <class TYPE> Queue::~Queue()
{
delete [] array;
}