原因: 1、没有添加 #include "stdafx.h" 2、#include "stdafx.h" 必须添加到.cpp文件的第一行。不能将其他头文件比如#include放在它的前面。 3、每个.cpp文件都必须有#include "stdafx.h"