- std::list<CRDepartment>::iterator it = deptList.begin();
- for (; it != deptList.end();)
- {
- CString strName = it->szName;
- OutputDebugString("\n********************关系列表*************************\n");
- OutputDebugString(strName);
- if (strName == _T("陌生人"))
- {
- it = deptList.erase(it);
- }
- else if (strName == _T("黑名单"))
- {
- it = deptList.erase(it);
- }
- else
- {
- it++;
- }
- }
STL list删除元素出错
最新推荐文章于 2021-12-27 11:18:34 发布