This function or variable may be unsafe. Consider using scanf_s instead.

去掉安全检查,开头加上即可:

 #define _CRT_SECURE_NO_WARNINGS

或者:

严重性代码 说明项目文件行禁止显示状态

错误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.hellof:\users\denggelin\documents\visual studio 2015\projects\hello\hello\源.c6

This function or variable may be unsafe. Consider using scanf_s instead.

右键项目,属性

预处理器,预处理器定义,编辑

新增:"_CRT_SECURE_NO_WARNINGS"

确定。

上一篇:【MongoDB】3.详细命令集合


下一篇:高效使用github