zoukankan      html  css  js  c++  java
  • 编译错误一: 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函数的参数用错了,汗。。。

  • 相关阅读:
    将地址转换为链接的正则表达式(regex url href)
    [收藏]中国惠普前总裁孙振耀谈人生
    沪江技术团队寻觅新成员,下一位会是你吗?
    来点圣诞气氛
    让VisualSVN Server支持匿名访问
    11月25日博客园南京园友聚会
    [上海俱乐部活动]博文视点与博客园系列图书作者见面会暨.NET技术交流会
    比尔·盖茨在微软的最后一天
    真让人兴奋
    博客园新服务器已下订单
  • 原文地址:https://www.cnblogs.com/huipengkankan/p/2282659.html
Copyright © 2011-2022 走看看