gaa*_*kam 1 c++ stdafx.h visual-studio visual-c++
MS Visual Studio 2017,来自VisualC++类别的新Windows控制台应用程序项目.默认stdafx.h
标头包含以下行:
#include <stdio.h>
#include <tchar.h>
Run Code Online (Sandbox Code Playgroud)
在他们下面:
// TODO: reference additional headers your program requires here
Run Code Online (Sandbox Code Playgroud)
因为这个评论被放在下面,而不是上面#include <stdio.h>
,我倾向于认为stdio.h
默认情况下包含这个评论并不是为了方便用户#include
,但是出于某种原因需要它?stdio.h
包含而不仅仅是这个事实cstdio
似乎支持这种解释?
我对吗?我可以安全地删除#include <stdio.h>
吗?我问,因为我main
函数的第一行是:
std::ios_base::sync_with_stdio(false);
Run Code Online (Sandbox Code Playgroud)
如果stdio
正在使用设施,这显然是不正确的,因为包含的这个标题会提示.
1)我可以安全地删除#include <stdio.h>
从中说出的行stdafx.h
吗?
2)我可以安全地打电话std::ios_base::sync_with_stdio(false)
吗?
3)tchar.h
此处默认包含的事实是否相关?
归档时间: |
|
查看次数: |
721 次 |
最近记录: |