编译错误一: std::find()函数

代码中使用了std::find函数,如下:

结果出现如下编译错误,且定位到系统文件中: 

1>D:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(40) : error C2784: 'bool std::operator ==(const std::deque<_Ty,_Alloc> &,const std::deque<_Ty,_Alloc> &)' : could not deduce template argument for 'const std::deque<_Ty,_Alloc> &' from 'unsigned __int64'
1>        D:\Program Files\Microsoft Visual Studio 9.0\VC\include\deque(1337) : see declaration of 'std::operator =='
1>D:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(40) : error C2784: 'bool std::operator ==(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not deduce template argument for 'const std::_Tree<_Traits> &' from 'unsigned __int64'
1>        D:\Program Files\Microsoft Visual Studio 9.0\VC\include\xtree(1453) : see declaration of 'std::operator =='
1>D:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(40) : error C2784: 'bool std::operator ==(const std::vector<_Ty,_Alloc> &,const std::vector<_Ty,_Alloc> &)' : could not deduce template argument for 'const std::vector<_Ty,_Alloc> &' from 'unsigned __int64'
1>        D:\Program Files\Microsoft Visual Studio 9.0\VC\include\vector(1310) : see declaration of 'std::operator =='
1>D:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(40) : error C2784: 'bool std::operator ==(const std::basic_string<_Elem,_Traits,_Alloc> &,const _Elem *)' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'unsigned __int64'
1>        D:\Program Files\Microsoft Visual Studio 9.0\VC\include\string(90) : see declaration of 'std::operator =='
1>D:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(40) : error C2784: 'bool std::operator ==(const _Elem *,const std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'const _Elem *' from 'unsigned __int64'
1>        D:\Program Files\Microsoft Visual Studio 9.0\VC\include\string(80) : see declaration of 'std::operator =='
1>D:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(40) : error C2784: 'bool std::operator ==(const std::basic_string<_Elem,_Traits,_Alloc> &,const std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'unsigned __int64'
1>        D:\Program Files\Microsoft Visual Studio 9.0\VC\include\string(70) : see declaration of 'std::operator =='
1>D:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(40) : error C2784: 'bool std::operator ==(const std::istreambuf_iterator<_Elem,_Traits> &,const std::istreambuf_iterator<_Elem,_Traits> &)' : could not deduce template argument for 'const std::istreambuf_iterator<_Elem,_Traits> &' from 'unsigned __int64'
1>        D:\Program Files\Microsoft Visual Studio 9.0\VC\include\streambuf(548) : see declaration of 'std::operator =='
1>D:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(40) : error C2784: 'bool std::operator ==(const std::allocator<_Ty> &,const std::allocator<_Other> &) throw()' : could not deduce template argument for 'const std::allocator<_Ty> &' from 'unsigned __int64'
1>        D:\Program Files\Microsoft Visual Studio 9.0\VC\include\xmemory(173) : see declaration of 'std::operator =='
1>D:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(40) : error C2784: 'bool std::operator ==(const std::istream_iterator<_Ty,_Elem,_Traits,_Diff> &,const std::istream_iterator<_Ty,_Elem,_Traits,_Diff> &)' : could not deduce template argument for 'const std::istream_iterator<_Ty,_Elem,_Traits,_Diff> &' from 'unsigned __int64'
1>        D:\Program Files\Microsoft Visual Studio 9.0\VC\include\iterator(266) : see declaration of 'std::operator =='
1>D:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(40) : error C2784: 'bool std::operator ==(const std::reverse_iterator<_RanIt> &,const std::reverse_iterator<_RanIt2> &)' : could not deduce template argument for 'const std::reverse_iterator<_RanIt> &' from 'unsigned __int64'
1>        D:\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(2246) : see declaration of 'std::operator =='
1>D:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(40) : error C2784: 'bool std::operator ==(const std::_Revranit<_RanIt,_Base> &,const std::_Revranit<_RanIt2,_Base2> &)' : could not deduce template argument for 'const std::_Revranit<_RanIt,_Base> &' from 'unsigned __int64'
1>        D:\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(2050) : see declaration of 'std::operator =='
1>D:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(40) : error C2784: 'bool std::operator ==(const std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' : could not deduce template argument for 'const std::pair<_Ty1,_Ty2> &' from 'unsigned __int64'
1>        D:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility(76) : see declaration of 'std::operator =='
1>D:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(40) : error C2677: binary '==' : no global operator found which takes type 'const FIDITEM' (or there is no acceptable conversion)

 

纠结了多日之后,终于解决了

find函数的参数用错了,汗。。。

转载于:https://www.cnblogs.com/huipengkankan/archive/2011/12/09/2282659.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值