typedef std::vector<int> intArray;
typedef std::vector<int>::iterator ptrAr;pAr = std::find(m_arIntDel.begin(), m_arIntDel.end(), i);// if find it, del it
if (pAr != m_arIntDel.end()) {
m_lcResult.SetCheck(i, FALSE);
m_arIntDel.erase(pAr); // 当i = 0 时发生访问冲突,0xc0000005 access violation
} else { // not in array, we should add it
m_lcResult.SetCheck(i);
m_arIntDel.push_back(i);
}
}
typedef std::vector<int>::iterator ptrAr;pAr = std::find(m_arIntDel.begin(), m_arIntDel.end(), i);// if find it, del it
if (pAr != m_arIntDel.end()) {
m_lcResult.SetCheck(i, FALSE);
m_arIntDel.erase(pAr); // 当i = 0 时发生访问冲突,0xc0000005 access violation
} else { // not in array, we should add it
m_lcResult.SetCheck(i);
m_arIntDel.push_back(i);
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货