Is there a way to set by default for all projects removing the precompiler secure warnings that come up when using functions like scanf().
(是否有一种方法可以为所有项目默认设置,以消除使用scanf()之类的函数时出现的预编译器安全警告。)
I found that you can do it by adding a line in the project option or a #define _CRT_SECURE_NO_WARNINGS
in the beginning of the code. (我发现您可以通过在项目选项中添加一行或在代码开头添加#define _CRT_SECURE_NO_WARNINGS
来实现。)
I find myself repeatedly creating new projects for solving programming contests and it is really annoying (and takes valuable time) to add:
(我发现自己反复创建新项目来解决编程竞赛,添加以下内容确实很烦人(并且花费了宝贵的时间):)
#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif
In the beginning of the code, or to set it in the precompiler options every time I start a new project.
(在代码的开头,或者在每次启动新项目时在预编译器选项中进行设置。)
ask by Juan Martinez translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…