严重性 代码 说明 项目 文件 行 禁止显示状态
错误 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. hello
报错的含义
‘scanf’:此函数或变量可能不安全。请考虑使用scanf_s。要禁用过时警告,请使用_CRT_SECURE_NO_WARNINGS。有关详细信息,请参见在线帮助。
解决
第一步找到项目
加入信息
进行测试
#include <stdio.h>
int main()
{
//整形输入
char a;
short b;
int c;
long d;
long long e;
scanf("%hhd %hd %d %ld %lld",&a, &b, &c, &d, &e);
printf("%hhd %hd %d %ld %lld", a, b, c, d, e);
return 0;
}