Possible Duplicate:
Why do I get “unresolved external symbol” errors when using templates?
I am using templates in my code while there is always an error LNK2019. Here is part of my code:
Method.h
template<typename type> void Method(Model<type>* sys); Method.cpp
template<typename type> void Method(Model<type>* sys){ blablabla;} Model.h
template<typename type> class Model{ blablabla;} class Model1:public Model<double>{ blablabla;} Main.cpp
Model<double> *sys=new Model1(); Method(sys); However, there always shows an error LNK2019: unresolved external symbol "void __cdec1 Method(class Model*)" referenced in function_main. Anyone knows where I am going wrong? Thanks a lot!