You're treating a type (T
) as a variable. The code
void push(const T){
if(!isFull()){
queuePtr[++top] = T;
}
}
should be
void push(const T& item){
if(!isFull()){
queuePtr[++top] = item;
}
}
or something like that.