BUG代码如下,这两个函数在RELEASE编译后执行时都会触发0xc0000417异常,查了很长时间没有解决,请大家帮忙看看。CArray<vector<int>> testArray;test1()
{
vector<int> a1;
a1.push_back(1);
testArray.Add(a1);
testArray.Add(a1);
testArray[0].push_back(2);
}test2()
{
vector<int> a1;
a1.push_back(1);
testArray.Add(a1);
testArray.Add(a1);
vector<int>::iterator itr = testArray[0].begin();
*itr;
}
{
vector<int> a1;
a1.push_back(1);
testArray.Add(a1);
testArray.Add(a1);
testArray[0].push_back(2);
}test2()
{
vector<int> a1;
a1.push_back(1);
testArray.Add(a1);
testArray.Add(a1);
vector<int>::iterator itr = testArray[0].begin();
*itr;
}
你用Debug看看,跟踪一下
http://connect.microsoft.com/VisualStudio/feedback/details/549044/carray-of-vectors-crashing-when-accessing-the-first-vector-in-release-mode
vc6下没问题