I am writing a head data structure for a school project, I am getting the following error when trying to compile my head header file of my heap's template:
Code:
In file included from topk.cpp:6:
CHeap.h:25: error: using template type parameter `TYPE' after `class'
CHeap.h:25: error: ISO C++ forbids declaration of `type name' with no type
CHeap.h:25: error: `CHeap<TYPE>' specified as declarator-id
CHeap.h:25: error: no `int CHeap<int>::CHeap<TYPE>(int)' member function
declared in class `CHeap<int>'
CHeap.h:25: error: template definition of non-template `int
CHeap<int>::CHeap<TYPE>(int)'
This is line 25:
Code:
template<class TYPE>
CHeap<class TYPE>::Cheap<TYPE>(int size) {
This is line 9 to 14:
Code:
template<class TYPE>
class Cheap() {
public:
CHeap<TYPE>(int size);
anyone know what that error means? thanks