这个问题在这里已经有了答案:Whycantemplatesonlybeimplementedintheheaderfile?(17个答案)关闭5年前。I'mgettingan"unresolvedexternalsymbol"public:__thiscallhijo::hijo(void)"referencedinfunction_main我开始了一个新项目,因为我在另一个更大的项目中遇到了同样的错误。当我尝试使用new关键字分配空间时发生错误。如果这个错误很愚蠢,请原谅我,因为我在过去几个月里没有编写任何程序。/********************filehijo.h*****