编译程序时老是出先这个错误!!!! 谁帮我弄下,我菜鸟学C++的,自学没人教,哪位大神帮我看下

来源:百度知道 编辑:UC知道 时间:2024/05/24 16:23:47
--------------------Configuration: 5121 - Win32 Debug--------------------
Compiling...
5121.cpp
c:\program files\microsoft visual studio\myprojects\5121\5121.cpp(28) : fatal error C1010: unexpected end of file while looking for precompiled header directive
执行 cl.exe 时出错.
我用的是VISUAL C 编译器。。

右键点工程名,选设置,然后选c/c++属性页,再选catagory选单中选 precompiled header ,将选项置成no use 或者autometic

如果自动建出来的工程你只是加东西没改东西的话... 在cpp最开始加上#include "stdafx.h"