int price = 0;
printf("请输入商品价格");
scanf("%d", &price);
if(price<50)
{
printf("买下它。");
}
else
{
printf("不买");
}
getch();
错误
错误 1 error 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. e:\vs\c\c\c.cpp 25 1 C
VS2013默认不允许你调用不安全的函数,你可以用scanf_s代替scanf
scanf("%d", &price);
->
scanf_s("%d", &price);
*using scanf_s instead,not scanf
using scanf_s instead 改用scanf_s
英文 明明 说的很清楚了啊