我有两个包含文件头
#include "stdafx.h"
#include "psapi.h"
Run Code Online (Sandbox Code Playgroud)
但是它给出了一个无法打开源文件"stdafx.h"的编译时错误.我正在使用Visual Studios 2010."stdafx.h"甚至是必要的吗?我是这么认为的,因为如果把它带走,程序就无法编译.
Visual Studio将其用于"预编译头"功能.如果您对Visual Studio没有经验,我建议将stdafx.h保留在项目中.
当然,如果你#include它,你应该拥有它.