草庐IT

HelloFunction

全部标签

C++ template-id 不匹配任何模板?

我用模板和特化写了一个简单的代码:#includetemplateintHelloFunction(constT&a){std::coutintHelloFunction(constchar*&a){std::cout我认为char*特化是正确的,但是g++报告:D:\work\test\HelloCpp\main.cpp:11:5:error:template-id'HelloFunction'for'intHelloFunction(constchar*&)'doesnotmatchanytemplatedeclaration请帮我找出错误。 最佳答案