Run-Time Check Failure #2 - Stack around the variable 'chCommand' was corrupted.

来源:互联网 发布:js href 跳转 编辑:程序博客网 时间:2024/05/15 08:57

点击MFC控件后出现如下错误:

Run-Time Check Failure #2 - Stack around the variable 'chCommand' was corrupted.

解决:

这是数组越界了;找到出问题的数组,这里是“chCommand”,重新赋予一个较大的地址空间值。

如原值为char chCommand[7]={}

改为char chCommand[10]={}后不再出现越界问题


0 0