I am writing the functions for a class that is templated using 3 files: qpqueue.h, qpqueue.cpp, and main.cpp
When I try to compile my project, I get an error saying, "ISO C++ forbids declaration of 'queue' with no type."
const int MAXPRIORITY = 10;
template <typename T>
void push (const T & item, int p);
// insert item with priority p,
// 0 <= p <= MAXPRIORITY
// find the non-empty queue with largest index and remove its
// front element
// Precondition: the queue is not empty, the function throws
// underflowError exception if the queue is empty
// find the non-empty queue with largest index and return
// its front element.
// Precondition: the queue is not empty, the function
// throws the underflowErr exception if the queue is empty
const T& top() const;
// constant version of top();
bool empty() const;
// is the queue empty?
int size() const;
// return the number of elements in the queue
queue<T> priority[MAXPRIORITY +1];
// priority[i] contains all elements with priority i
// in their order of insertion
// number of elements in the priority queue
I'm not sure if there's a problem with the implementation of my qpqueue.cpp file, or if I just need to have code in main() that actually implements the qpqueue class with a specified type. Thanks.