Hi,
I am having a problem declaring a class template prototype, i.e:
template <class type>
class foobar<type>; // the prototype
// some code...
template <class type>
class foobar { // the definition
// some other code...
};
My VC++ compiler returns (at the “class foobar<type>;” line):
error C2143: syntax error : missing ';' before '<'
And when I just set the prototype to “class foobar;” it returns:
error C2989: foobar: template class has already been defined as a non-template class
For clarity I should point out that the class prototype, definition and functions are all in
the same file and compile fine if I don’t add the prototype and the code that requires it.
So the question is how does one declare a class template prototype?
Any help is greatly appreciated.