使用visual C++6.0运行时,出现fatal error C1010:unexpected end of … 出现这种错误的原因,是因为没有添加"#include<stdafx.h>"这个头文件。 解决方法就是在代码的第一行加一条语句:#include<stdafx.h>.