运行通过,但是编译时出现了警告,原因不解,求教!
程序代码:
#include<stdio.h> int main() { int x,y; printf("请输入x:\n"); scanf("%d",&x); if(x<0) y=-1; else if(x==0) y=0; else y=1; printf("x=%d,y=%d",x,y); return 0; } 警告 1 warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
[ 本帖最后由 日寂 于 2013-12-21 22:26 编辑 ]