我在用vs2005写c时,遇到这样一个warning:

来源:百度知道 编辑:UC知道 时间:2024/05/06 11:04:57
我在用vs2005写c时,遇到这样一个warning:
'scanf' was declared deprecated,
什么意思,怎么改,谢谢
5分

不用管。
这个warning不会导致错误。很正常的
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.
因为scanf的声明在VS2005中被认为是不安全的,让你使用scanf_S来代替。你可以使用帮助来获取细节。