_CRT_SECURE_NO_WARNINGS [英] _CRT_SECURE_NO_WARNINGS

查看:80
本文介绍了_CRT_SECURE_NO_WARNINGS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用MS VS 2013来编译一个大的遗留程序,除非我输入_CRT_SECURE_NO_WARNINGS指令,否则它将无效。正确地在预处理器框中。我不喜欢一次又一次地工作,如果有人知道MS VS 2015和MS VS 207是否也以这种方式运行,我想知道

I am currently using MS VS 2013 to compile a large legacy program that won’t work unless I type the _CRT_SECURE_NO_WARNINGS directive  properly in the preprocessor box. I don’t like working my way through this time and time again, and am wondering if anyone knows whether MS VS 2015 and MS VS 207 also operate in this way.

推荐答案


除非我输入_CRT_SECURE_NO_WARNINGS指令,否则这个大型遗留程序将无效。 正确地在预处理器框中。我不喜欢一次又一次地工作。

a large legacy program that won’t work unless I type the _CRT_SECURE_NO_WARNINGS directive  properly in the preprocessor box. I don’t like working my way through this time and time again

因为它们是安全*警告*而不是错误,我不知道为什么你说这个程序"b不会起作用"。无论如何,不​​是在项目属性中设置该字符串,而是在每个源代码文件中添加一个#define指令作为第一个$
行: br $>


#define _CRT_SECURE_NO_WARNINGS

#include" stdafx.h"

#include ...

#include ...

等。



- Wayne



As they are security *warnings* and not errors, I don't know why you say
the program "won’t work". In any event, rather than set that string in
the project properties you can simply add a #define directive as the first
line in each of your source code files:

#define _CRT_SECURE_NO_WARNINGS
#include "stdafx.h"
#include ...
#include ...
etc.

- Wayne


这篇关于_CRT_SECURE_NO_WARNINGS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆