这个都出错,为什么啊?请大家帮忙看看
#include <stdio.h>int main()
{
while(1)
{
short m = 1;
scanf("%d",&m);
if(m == 0) break;
printf("m is %d\n",m);
}
getch();
return 0;
}
当输入 0 时,会报错:Run-Time Check Failure #2 - Stack around the variable 'm' was corrupted.
这是为什么啊?