错误简介
在VS 2012 中编译 C 语言项目,如果使用了 scanf 函数,编译时便会提示如下错误:
错误 1 error 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. f:\vs2013 project\consoleapplication1\consoleapplication1\hello.c 8 1 ConsoleApplication1
原因是Visual C++ 2012 使用了更加安全的 run-time library routines 。新的Security CRT functions(就是那些带有“_s”后缀的函数&#