stdafx.h:我什么时候需要它? [英] stdafx.h: When do I need it?

查看:160
本文介绍了stdafx.h:我什么时候需要它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到这么多的代码,包括stdafx.h。说,我希望预编译的标题。我会 自动手动添加所有必需的系统标题。在这种情况下还有其他好的理由我应该知道我需要 stdafx.h

I see so much code including stdafx.h. Say, I do not want pre-compiled headers. And I will include all the required system headers myself manually. In that case is there any other good reason I should be aware of where I require stdafx.h?

推荐答案

如果你不想使用预编译的头文件,那么没有必要使用标准的包含文件 - 这将减慢包含它的每个文件的构建,并使它们包含额外的他们不需要的东西。摆脱它,只是包括他们需要的标题。

If you don't want to use precompiled headers, then there is no point to using a standard include file - this will slow down the build for every file that includes it and cause them to include extra stuff that they do not need. Get rid of it and just include the headers they need.

这篇关于stdafx.h:我什么时候需要它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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