CString中的指针如何控制
我的程序运行一段时间后,偶而会出现下面错误!
Debug Assertion Failed!
program:.......exe
File: afx.inl
Line: 122
For information on how your program can cause an assertion failure,see the visual c++ documentation on asserts。
查afx.inl中的122行:
// CString
_AFX_INLINE CStringData* CString::GetData() const
{ ASSERT(m_pchData != NULL); return ((CStringData*)m_pchData)-1; }
我细查过程序中没有CString数组越界,也没有内存泄露。难道CString中的成员函数会引起这种错误?
谢谢!