thetemplate.h:
test.cpp:Code:template<typename X> class temp { public: temp(); };
Code:#include "thetemplate.h" template<typename X> temp<X>::temp() { }
main.cpp:
g++ main.cpp test.cpp:Code:#include "thetemplate.h" int main() { temp<int> t; return 0; }
Code:/tmp/ccaJaZBs.o(.text+0x23): In function `main': : undefined reference to `temp<int>::temp()'
What's the problem?