VS2010 -- 'back_inserter': identifier not found
来源:互联网 发布:通达信有mac版指标导入 编辑:程序博客网 时间:2024/05/22 01:47
VisualStudio 2010中的VC++对C++0x提供了很多支持,很多标准也与C++0x接轨。这样做的好处是很多的,但同时也会导致以前一些不符合C++0x规范的代码无法像原来那样工作。
问题:error C3861: 'back_inserter': identifier not found
解决方法:#include ﹤iterator﹥
问题在于,back_inserter()在没有include ﹤iterator﹥的情况下被使用。C++标准库的headers会通过某种未定义的方式将其他headers包括进来。……VC9SP1下,include﹤algorithm﹥顺带的就包括了﹤iterator﹥,但在VC10 Beta 1下需要单独写明。
问题2: error C2664: 'std::vector﹤_Ty﹥::_Inside' :cannot convert parameter 1 from 'IUnknown **' to 'const ATL::CComPtr﹤T﹥ *'
解决方法:使用CAdapt
标准容器禁止其元素将运算符的address-of过载。CComPtr将运算符的address-of过载,导致 vector﹤CComPtr﹤T﹥﹥被禁止。这是因为,在VC9SP1中,vector并在push_back()中使用不使用运算符的address-of,但在VC10 Beta 1中是使用的。
解决方法就是使用﹤atlcomcli.h﹥的CAdapt。……
问题3: error C2662: 'NamedNumber::change_name' : cannotconvert 'this' pointer from 'const NamedNumber' to 'NamedNumber &'
解决方法:Respect set Immutability (尊重set的不变性)
问题4:Specializing stdext::hash_compare
(如果你为你的type使用非标准话的 ﹤hash_set﹥或﹤hash_map﹥,以及特别的stdext::hash_compare,那你会发现这里没法儿用了,因为它们被移到了命名空间下。 ……)
解决方法:使用 ﹤unordered_set﹥ 或﹤unordered_map﹥
转自:http://developer.51cto.com/art/200905/125567.htm
源文档 <http://blog.163.com/yabin99@126/blog/static/134293362201031844410150/>
- VS2010 -- 'back_inserter': identifier not found
- VS2010常见问题: 'back_inserter': identifier not found
- error C3861: ‘back_inserter': identifier not found
- identifier not found问题解决
- TryEnterCriticalSection: identifier not found
- C++ - Identifier not found
- InitializeCriticalSectionAndSpinCount identifier not found
- 关于'GetModuleHandleEx': identifier not found
- error C3861: 'cvCreateHidHaarClassifierCascade': identifier not found
- 关于'GetModuleHandleEx': identifier not found的问题
- vs2005出现错误:'AfxLoadLibrary': identifier not found
- error C3861: 'TryEnterCriticalSection': identifier not found
- error C3861: 'round': identifier not found
- error C3861: 'round': identifier not found
- WTL error C3861: 'DDX_Control': identifier not found
- error C3861: identifier not found | 找不到标识符
- “error C3861: 'random': identifier not found”解决办法
- error C3861: 'AtlLoadSystemLibraryUsingFullPath': identifier not found
- PHP 出现Notice: Use of undefined constant 的解决方案
- 常用算法(1) 将排序二叉树转换双向链表
- 对顺序容器的几点注意
- VS2010 -- fatal error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher
- 正规表达式实际使用案例之一:
- VS2010 -- 'back_inserter': identifier not found
- android音乐播放器监听电话状态
- 浅谈Hibernate的flush机制
- java.util.ConcurrentModificationException 解决办法
- C#中HashTable 使用的疑惑
- mysql 数据库卸载不完全,配置出错解决办法
- 数据库设计范式的理解[转]
- 关于迭代器失效的一些认识
- Java中的异常处理机制的简单原理和应用。