Class Templates pls help

G

ghalex

I have try to search in all the message related with this subject but
with no help.

I have to files :

test.h
//--
template <class varType>
class CTest{

public:
CTest(void);

protected:
varType *m_p;
};
//--

test.cpp
//--
#include "Array.h"

template <class varType>
CTest<varType>::CTest() {
m_p = new varType;
}
//--

in main app :
CTest<int> temp;

the error is :
public: __thiscall CTest<int>::CTest<int>(void)
fatal error LNK1120: 1 unresolved externals

pls help ??????????????????
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top