S
Salvatore Di Fazio
Hi guys,
I made the following template:
template <class RECORD, int iSize>
class CArrayTable
{
public:
CArrayTable();
~CArrayTable();
// ...
};
template <class RECORD, int ISIZE>
CArrayTable<RECORD, iSize>::CArrayTable()
{
m_iCount = ISIZE;
m_iIndex = 0;
m_pRECORD = new RECORD[iElement];
}
when I try to use this template:
CArrayTable<CIntAirport, 10> Table;
I receive a linker error:
SDPF error LNK2019: unresolved external symbol "public: __thiscall
CArrayTable<class CIntAirport,10>::~CArrayTable<class
CIntAirport,10>(void)" (??1?$CArrayTable@VCIntAirport@@$09@@QAE@XZ)
referenced in function "public: int __thiscall
CMainFrame::ImportDafifFile(class CStringArray &,class CStringArray
&,class CStringArray &)"
(?ImportDafifFile@CMainFrame@@QAEHAAVCStringArray@@00@Z)
Anybody know why?
I made the following template:
template <class RECORD, int iSize>
class CArrayTable
{
public:
CArrayTable();
~CArrayTable();
// ...
};
template <class RECORD, int ISIZE>
CArrayTable<RECORD, iSize>::CArrayTable()
{
m_iCount = ISIZE;
m_iIndex = 0;
m_pRECORD = new RECORD[iElement];
}
when I try to use this template:
CArrayTable<CIntAirport, 10> Table;
I receive a linker error:
SDPF error LNK2019: unresolved external symbol "public: __thiscall
CArrayTable<class CIntAirport,10>::~CArrayTable<class
CIntAirport,10>(void)" (??1?$CArrayTable@VCIntAirport@@$09@@QAE@XZ)
referenced in function "public: int __thiscall
CMainFrame::ImportDafifFile(class CStringArray &,class CStringArray
&,class CStringArray &)"
(?ImportDafifFile@CMainFrame@@QAEHAAVCStringArray@@00@Z)
Anybody know why?