'scanf' was declared deprecated,

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

我在用vs2005写c时,遇到这样一个warning:
'scanf' was declared deprecated,

答:这个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来代替。你可以使用帮助来获取细节。

你可能感兴趣的:(C/C++)