代码改变世界

stack around the variable “ ” was corrupted

2013-08-02 23:28  youxin  阅读(272)  评论(0编辑  收藏  举报

用scanf格式控制不当经常发生此错误。

short int a=10;
 
scanf("%d",&a);

应该是%hd;

一般是越界引起的。

参看:http://blog.sciencenet.cn/blog-436197-549687.html