Заголовок:Объявив метод заголовка метода шаблонный прототипа класса
#include <iostream>
using namespace std;
template <class A_Type> class Queue
{
public:
Queue(int = 10);
Queue(const Queue<A_Type>&);
~Queue();
Queue& operator=(const Queue&);
bool enqueue(A_Type);
bool dequeue(A_Type&);
bool empty() const;
bool full() const;
bool clear();
A_Type * getData();
bool operator==(const Queue&) const;
friend ostream& operator<<(ostream&, const Queue<A_Type>&);
private:
int max;
int front;
int rear;
A_Type *data;
};
Моя попытка объявить метод в Queue.cpp (Ошибка появляется на первой строке):
Queue<class A_Type>::Queue(const Queue<A_Type> &q)
{
front = q.front;
rear = q.rear;
max = q.max;
data = new A_Type[max];
data = q.data;
}
Затмение выдает ошибку:
forward declaration of 'class A_Type'
И я не совсем уверен, что это значит и как это исправить. Любые советы или помощь будут очень признательны.
спасибо, что заранее.