…………
CRecord* pRecord = new CRecord();
pRecord = &(pList->GetHead());
pos1 = pos = pList->GetHeadPosition();
CString str = GetListCtrl().GetItemText(index, 0);
while(str != pRecord->m_strTitle)
{
pos1 = pos;
pRecord = &(pList->GetNext(pos));
}
if( MessageBox("确定要删除选定的项目?") == IDOK)
{
pList->RemoveAt(pos1);
ShowItem();
}
delete pRecord;
………………为什么执行delete会出错??
其中pList是保存的一个 CList<CRecord,CRecord>* 指针,