hello, i am trying to build a Queue, with the use of templates, so that it is possible to create 'int', 'string' queues and so on...
i have been given a class definition for my template queue (TQueue), which includes this:
void add(Node<T> *n);
i have created a my queue like this:
TQueue<int> myQueue(); //works fine!
my problem is when i am to add Nodes, i do this:
Node<int>* myIntNode=new Node<int>(number);
myQueue.add(myIntNode); //the compiler doesn't accept this
regarding my last operation, i get the following error msg:
"Structure required on left side of . or .*"
what am i doing wrong?