赞加海岸在哪里:VC++简单问题

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/29 21:08:41
我写了个很简单的程序,为什么会提示错误,请大家帮我看看是哪里出了毛病呀,谢谢了。
程序:
#include<iostream>
using namespace std;
//---------------------
int main(){
double radius;
cout<<"please input radius: ";
cin>>radius;
cout<<"The result is "<<radius*radius*3.14*4<<"\n";
}//=========================
错误提示:
Compiling...
1.cpp
c:\program files\microsoft visual studio\myprojects\test\1.cpp(10) : fatal error C1010: unexpected end of file while looking for precompiled header directive
Error executing cl.exe.

1.obj - 1 error(s), 0 warning(s)
不知道怎么回事呀,现在好象编译能通过但EXE文件建不起来,提示错误都查不多,会不会是其他哪里的毛病呢。

#include "stdafx.h"
建议新手用VC向导生成工程

我试了一下,除了有个main缺少return语句的warning就没什么error了啊

我也是了一下,能正确运行啊。而且你把main的返回值改成void连waring也没了。