文章出处:http://hi.baidu.com/%D6%BB%D3%B0%C1%F7%C0%CB/blog/item/0d72bcb477b2bbc236d3cad4.html
Run-Time Check Failure #2
一般是栈被破坏,代码可能有缓冲区溢出一类的问题。 Run-Time Check Failure #2 - Stack around the variable 's' was corrupted This problem is caused when you try to write too much data to a particular memory address. Typical causes are writing more to a string buffer than you have room for. 可能会有以下几种情况: 一、 strcpy、memcpy、strncpy、stpcpy、bcopy等拷贝区的大小不匹配,引起冲突或溢出造成的。 例如: void myfun() { char mybuf[10]; strcpy(mybuf, "This is definitely more than 10 characters long, it will also cause a Run-Tim |