请帮帮忙,
CStringList* CListCtrlPop::SelectStringList(int number, CStringList *newstringlist)
{
if(number<0)
{
MessageBox("stringlists.number<0");
return NULL;
}
ASSERT(newstringlist!=NULL);
CStringList* temp=m_strlist;
m_iColumns=number;
this->m_strlist=newstringlist;
this->ClearListAllColumn();
int length=0;
CString str;
int* col_length=new int[m_iColumns];
for(int k=0;k<m_iColumns;k++)
col_length[k]=8;
for(int i=0;i<m_iColumns;i++)
{
this->m_listctrl->InsertColumn(i,m_strlist[i].GetHead()); 调试到这里就出错
col_length[i]=max(col_length[i],m_strlist[i].GetHead().GetLength());
.........
}
调试出错提示:
Unhandled exception in al.exe(MFC42D.DLL)0Xc0000005:Access Violation
堆栈提示出错的信息:
CStringList::GetHead() line 376 + 38 bytes
AL! 0040fae1()
AL! 00414505()
AL! 0040dcb8()
AL! 0040df16()
AfxDlgProc(HWND__ * 0x00041c4e, unsigned int 272, unsigned int 989930, unsigned int 989930) line 35 + 14 bytes
USER32! 754b86ef()
USER32! 754a9eb2()
USER32! 754ab98b()
USER32! 754c90f9()
USER32! 754b86ef()
USER32! 754b8876()
USER32! 754b43cf()
USER32! 754d41f9()
这是什么出错,怎样改,谢谢帮忙