请高手指点:操作CString对象时,经常出现:UnHanlded Exception: 0x00000005 access violation!
列如:
typedef struct filestr
{
CString name;
filestr *next;
}FIL;
FIL *Tem;
Tem= NEW FIL;
............
Tem->name.MakeLower();//error happened
单步进入:
_AFX_INLINE CStringData* CString::GetData() const
{ ASSERT(m_pchData != NULL); return ((CStringData*)m_pchData)-1; }
可以看到 m_pchData为空!?
哪出错了?