Run-Time Check Failure #2 - Stack around the varia

Run-Time Check Failure #2 - Stack around the variable 'psw' was corrupted.數組

關於這個問題,其實很簡單,就是由於psw這個出現了溢出現象。ide

拿我我的例子來講吧,如圖:
Run-Time Check Failure #2 - Stack around the varia
3d

就是由於 psw[ ] 這個數組沒有給它附上長度來限制,致使了溢出,因此只要給這個數組附上數組長度就行。blog

Run-Time Check Failure #2 - Stack around the varia

修改後就沒有出現錯誤報告,正常運行。it

相關文章
相關標籤/搜索