I am new to class templates and am having trouble. I have a function that doesn’t declare (ie. to be an int, double etc). But it doesn’t make sense to declare in this function. Therefore I am getting errors. Thanks for the help.
I have the following function:
bool QueType<ItemType>::IsEmpty() const
// Returns true if there are no elements on the queue and false otherwise.
{
return (front == NULL);
}
This returns the following errors:
Error 1 error C2065: ‘ItemType’ : undeclared identifier
Error 2 error C2955: ‘QueType’ : use of class template requires template argument list
Error 3 error C2509: ‘IsEmpty’ : member function not declared in ‘QueType’
I think you’re looking for: