MAP添加数据, 执行报错.
.h中定义:
struct st_plugin{
int Ref;
HANDLE Handle;
};
map <char*, st_plugin> m_Plugin;
.cpp中
执行函数:插入数据.
char * szPluginName = "Hello";
st_plugin st_test;
st_test.Handle = this;
st_test.Ref += 1;
m_Plugin[szPluginName] = st_test; //执行到这一步, 程序中断?
//-----------------------------------------------------
提示: SATester.exe 中的 0x00410a0b 处未处理的异常: 0xC0000005: 读取位置 0x00000004 时发生访问冲突
确定-转到:_Nodeptr _Lbound(const key_type& _Keyval) const
{ // find leftmost node not less than _Keyval
_Nodeptr _Pnode = _Root();
_Nodeptr _Wherenode = _Myhead; // end() if search fails
//-------------------------------------------------------