#include "test.h"
template<typename T>
test<T>::test(const T &elem):data(elem)
{
}
template<typename T>
test<T>::~test()
{
delete data;
}
template<typename T>
class test
{
private:
T data;
public:
test(const T &elem);
~test();
};
#include"test.h"
int main()
{
test<int> a(2);
}
Classes and implementations and main functions are written in different files by me, when i try to compile it ,The compiler will report an error,but i can't find what's wrong.