Hi Gurus,

I have a problem with templates.
Here is a simplified version of my problem..
Any suggestion will be very appreciated.

In main code I call this

CMainEtc::OnClickOK()
{
CTrioGeneral tg;
tg.HelloThere();
}


I gets the following error.

error LNK2019: unresolved external symbol
"public: __thiscall CTrioGeneral::CTrioGeneral(void)"
(??0CTrioGeneral@@QAE@XZ) referenced in function
"public: void __thiscall CDenemeTemplDlg::OnBnClickedTest(void)"
(?OnBnClickedButton1@CDenemeTemplDlg@@QAEXXZ)


Here is the simplified code

//-----------------------------------------------------------//
template< class TXXX, class TYYY, class TZZZ >
class CTrio

{
public:
CTrio(){};
~CTrio(){};

TXXX* m_pXXX;
TYYY* m_pYYY;
TZZZ * m_pZZZ;
};

//-----------------------------------------------------------//
template<class TYYY, class TZZZ >
class CCouple

{
public:
CCouple(){};
~CCouple(){};

TYYY* m_pYYY;
TZZZ * m_pZZZ;
};


//-----------------------------------------------------------//
template< class TZZZ >
class CSingle

{
public:
CSingle(){};
~CSingle(){};

TZZZ * m_pZZZ;
};


//----------------//
class CBit
{
public:
CBit(){};
~CBit(){};
};

//-----------------------------------------------------------//
class CSingleEx : public CSingle<CBit>
{
public:
CSingleEx(){};
// no destructor
};

//-----------------------------------------------------------//
template<class TYYY>
class CTrioEx : public CTrio<CCouple<TYYY, CBit>, TYYY, CBit>

{
public:
CTrioEx(){};
// no destructor
};

//-----------------------------------------------------------//
class CTrioGeneral : public CTrioEx<CSingleEx>
{
public:
CTrioGeneral();
// no destructor

void HelloThere(){ AfxMessageBox("Hello There"); };
};