您的位置:C++老鼠窝编程 新闻公告 正文
 添加时间:2008-09-25 原文发表时间:2008-09-25 人气:2


出现这个错误最明细的原因是使用数组访问越界的问题
如使用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.

本页地址
相关文章

_CrtIsValidHeapPointer(PUserData) on exi
_CrtIsValidHeapPointer fails on globally
_ASSERTE(_CrtIsValidHeapPointer(pUserDat
VC Debug中“please enter the path for mf
afxcontextisDLL表示什么意思呢?
_BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
C++ sizeof 祥解
直接通过ODBC读写Excel表格文件
VC++ 中的ODBC 编程
vc 在ODBC 中应用DDX 和 RFX

相关评论


本文章所属分类:首页 新闻公告