在程序中用到scanf()时,需要在代码开篇输入
#define _CPT_SECURE_NO_WARNINGS
或者将scanf改成
scanf_s
否则,会产生报错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.