scanf and scanf_s in VS2013 use in VS2013, each use scanf will error: This function or variable can be unsafe. Consider using scanf_s instead. To disable deprecation, use _crt_secure_no_warnings. See online Help for details.
Give two kinds of solutions, or use scanf_s, or use _crt_secure_no_warnings to deal with no error, why does it appear this reason?
scanf () does not check the bounds while reading, so it can cause a memory leak, so VS2013 provides a scanf_s () instead, which must be supplied to scanf_s when called to indicate how many characters are read, using scanf_s ("%c",& Letter,sizeof (letter)), otherwise, even if Ctrl+f7 and Ctrl+f5 Pass, the results of the program may differ greatly from what you expect.
If you do not want to use the scanf function, you can suppress the warning in the following two ways:
(1) Right-click on the project--attribute--c/c++--preprocessor--add _crt_secure_no_warnings to the preprocessor definition, then click OK to exit.
(2) at the top of the function definition: #define _CRT_SECURE_NO_WARNINGS, can also prohibit error warning.
Report
The use of scanf and scanf_s in VS2013