出现这个错误最明细的原因是使用数组访问越界的问题
如使用CArray的情况下 getat(最大数目+N)访问 就会提示这个问题。
这个错误是 ASSERT 宏提示的错误。
afxtempl.h 中第253和254行内容如下:
AFX_INLINE TYPE CArray<TYPE, ARG_TYPE>::GetAt(int nIndex) const
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
应该是你调用 GetAt 方法传递的参数 nIndex 小于 0 或者等于或大于字符串的长度。
=========
If you actually promise your code is right, you should check your watch dialog whether you observe the debug value and use array item.
Debug window can result in beyonding array bound. |