我们在我们的visual studio应用程序中使用地图。在调试模式下插入正常。但在发布模式中插入地图时,抛出以下异常:“在0x201a1cfd(dll)中未处理的异常在exe中:0xC0000005:访问冲突读取位置0xcdcdcdd1。”当控制通过下面的代码行时。插入到地图中没有发生
"iterator _Where = this->lower_bound(_Keyval);"
mapped_type& operator[](const key_type& _Keyval)
{ // find element matching _Keyval or insert with default mapped
iterator _Where = this->lower_bound(_Keyval);
if (_Where == this->end()
|| this->comp(_Keyval, this->_Key(_Where._Mynode())))
_Where = this->insert(_Where,
value_type(_Keyval, mapped_type()));
return ((*_Where).second);
}
这段代码位于外部依赖关系中的映射文件中。
请有人建议解决方案.. 在此先感谢。
你可能想告诉我们你的代码 –
为什么这有一个C#和C++标签? – chris
0xcdcdcdd1看起来像一个内存绑定,这意味着你正在访问错误的内存...... - >是的,显示你的代码! – Mario