0

Here's my function that i call from main.
However i'm getting an error "stackType undeclared"
Does anyone know what i'm doing wrong ?

template<class Type>
void removeX(queueType<Type>& Q)
{     
  stackType<Type> stackQ;
     
   while (!Q.isEmptyQueue())
   {     
     stackQ.push(Q.front());
     Q.deleteQueue();
   }
}
2
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by Reg74
0

The compiler does not know a

template <class Type>
class stackType
{
    ...
};

Maybe you forgot an #include?

0

Nope i used ... #include <stack> ... in my main program

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.