Original Post
There is probably just something really stupid wrong with this code. Nothing real fancy yet. They don't even do anything yet. But I tried compiling this and get this back main.obj : error LNK2019: unresolved external symbol "public: __thiscall CDoubleLinkList::~CDoubleLinkList(void)" (??1?$CDoubleLinkList@H@@QAE@XZ) referenced in function _main main.obj : error LNK2019: unresolved external symbol "public: __thiscall CDoubleLinkList::CDoubleLinkList(void)" (??0?$CDoubleLinkList@H@@QAE@XZ) referenced in function _main I have tried looking at various how to template stuff, and I think what I wrote looks correct. I will note I'm using Visual Studio C++ 2005 Express Beta, so it is possibly something wrote with the compiler.
// Header File
template <typename T>
class CDoubleLinkList
{
public:
CDoubleLinkList(void);
~CDoubleLinkList(void);
protected:
private:
};
// Cpp File
#include "CDoubleLinkList.h"
template <typename T>
CDoubleLinkList<T>::CDoubleLinkList(void)
{
}
template <typename T>
CDoubleLinkList<T>::~CDoubleLinkList(void)
{
}
#include "CDoubleLinkList.h"
int main(void)
{
CDoubleLinkList<int> dllTest;
return 0;
}