0

I've got this in the header file for a templatized priority queue;

template <typename ElemType>
class HeapPQueue {
public:
    HeapPQueue<ElemType>();
    ~HeapPQueue<ElemType>();

etc

And this in the cpp file;

#include "pqueue-heap.h"
#include "cmpfn.h"
#include "error.h"
using namespace std;

template <typename ElemType>
HeapPQueue<ElemType>::HeapPQueue() {
    capacity = START_CAPACITY;
    heap = new ElemType[capacity];
    logSize = 0;
}

template <typename ElemType>
HeapPQueue<ElemType>::~HeapPQueue() {
    delete[] heap;

}

I'm getting the error message "unknown type name HeapPQueue". Why?

Robbie Cooper
  • 485
  • 2
  • 5
  • 12

0 Answers0