c++问题,请高手指教

来源:百度知道 编辑:UC知道 时间:2024/05/21 10:02:09
我运行C++.老是这个错误,有没有解决的办法
c:\program files\microsoft visual studio\myprojects\y\y.cpp(21) : fatal error C1010: unexpected end of file while looking for precompiled header directive
执行 cl.exe 时出错.

解决办法
1.cpp文件开头没包含stdafx.h
2或者
右键点工程名,选设置,然后选c/c++属性页,再选catagory选单中选 precompiled header ,将选项置成no use 或者autometic

c:\program files\microsoft visual studio\myprojects\y\y.cpp(21) 21行有错
C1010: unexpected end of file while looking for precompiled header directive
貌似有东西不好编译 缺少头文件吧

是不是多文件结构没弄好啊?是不是头文件没有被包含进去?你再多了解一下多文件结构。

缺少头文件
刚开始有没有# include <> 文件阿