无法识别的模板声明/定义 [英] Unrecognizable template declaration/definition

查看:199
本文介绍了无法识别的模板声明/定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有这个:



< pre lang =c ++> template < typename T>
list< T> WINAPI do_search(字符串研究,字符串参数,EcosiaHtmlParser解析器);









 模板< typename T> 
list< T> WINAPI EcosiaSearcher :: do_search(字符串研究,字符串参数,EcosiaHtmlParser解析器)
{





我得到一个无法识别模板声明/定义错误。我不知道为什么,我错过了什么?我把这个函数称为:



  return  EcosiaSearcher :: do_search< ; EcosiaWebResult>(研究,参数,_web_parser); 





提前感谢您的帮助。



我尝试了什么:



i试了很多东西^^我认为这是传递类型的问题某处

解决方案

好的我找到了原因:#include< list>缺少:)


Hi everybody,

I have this :

template <typename T>
list<T> WINAPI do_search(string research, string parameters, EcosiaHtmlParser parser);



and

template <typename T>
list<T> WINAPI EcosiaSearcher::do_search(string research, string parameters, EcosiaHtmlParser parser)
{



and i'm getting an Unrecognizable template declaration/definition error. I don't know why, am i missing something ? i call the function like this :

return EcosiaSearcher::do_search<EcosiaWebResult>(research, parameters, _web_parser);



thanks in advance for your help.

What I have tried:

i tried a lot of things ^^ i think it s a problem of passing types somewhere

解决方案

Ok i found the reason : #include <list> was missing :)


这篇关于无法识别的模板声明/定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆