Original Post
I have gust begun to experiment with class templates, and I have come up to a linking problem. When I compile my program I get the error 'error LNK2001: unresolved external symbol "public: int _thiscall CTemplateClass[class OBJECT]::FreeObject(OBJECT **p)...', it continues on with some jibberish. Has any one had this problem before and knows how to fix it? I'd greatly apprecate it if some one could point me in the right direction.
This is how the object is defined:
template[typename OBJECT] class CTemplateClass : virtual public CMaintenance {
.
.
.
public:
int FreeObject(OBJECT **p);
.
.
.
};
template[typename OBJECT] int CTemplateClass[OBJECT]::FreeObject(OBJECT **p)
{
.
.
.
}
The class is defined in the file CTemplateClass.h and the functions in CTemplateClass.cpp. the main() function in in the file main.cpp and includes CTemplateClass.h, it also has the file CTemplateClass.cpp included into the project as a source file.
PS - Replace the square brackets ([]) with angle brackets. There seems to be a problem with using angle brackets in this MB.
Edited by - UraniumRod on 3/10/00 10:05:54 PM