Помогите разобраться с ошибкой "error LNK2019: ссылка на неразрешенный внешний символ". В Microsoft Visual C++ 2010
//test_class.h
#ifndef TEST_CLASS
#define TEST_CLASS
#include
#include
using namespace std;
template
class test_class
{
T *a;
int n;
public:
test_class(int);
~test_class();
bool get(istream&);
bool print(ostream&);
};
#endif // TEST_CLASS
//test_class.cpp
#include "test_class.h"
template
test_class::test_class(int n){
a = new T[n];
}
template
test_class::~test_class(){
delete[] a;
}
template
bool test_class::get(istream &tr){
for (int i=0; i> endl;
return true;
}
// main.cpp
#include "test_class.h"
void main(){
test_class a(5);
}
Когда создаю объект этого класса в мэйне, то выдает эту ошибку при компиляции, хотя без этого создания, все компилируется успешно.