Dan Chak wrote in a message to All:
DC> ----cut--
DC> // This is "queue.h"
DC> template
DC> class Queue {
DC> private:
DC> Queue();
The ctor is private, so only the member functions can create an instance of
this class (your first compiler error). Make it public solves the problem.
DC> queue* next;
DC> static Queue* front;
DC> static Queue* back;
DC> dataType info;
DC> int length;
DC> public:
DC> Enqueue(dataType Element);
DC> dataType Dequeue();
DC> int length();
DC> // template processAll(int (*func));
DC> dataType operator=(dataType op2);
Here you declare the operator= as a member.
DC> };
DC> template operator=(dataType op2) {
DC> *this = op2;
DC> }
But here you do not define it as a member. Try
template
dataType Queue::operator=(dataType op2) {
return *this = op2;
}
By the way, your definition of the assignment operator is exactly the same as
the default one.
mvg/wr
--- timEd/2 1.01.g3+
---------------
* Origin: LightHouse BBS ==> I am a H.U.G.O. Member ! (2:285/324.3)
|