新手请帮助 一段简单的代码 请帮我看看 #include<iostream>
using namespace std;
const double PI=3.14159;
int main ()
{ float radius,height,volume;//定义变量
cout<<"请输入圆锥底的半径:"<<endl;//prompt operator input the radius of the cone
cin>>radius; //assignment radius
cout<<endl<<"please input the height of the cone"<<//prompt operator to input the height of the cone
cin>>height;
volume=1.0/3.0*PI*radius*height;//calculate the volume of the cone
cout<<"the volume of the cone is"<<endl<<volume;//output the volume of the cone
return 0;//end
}
我是用的是visual c++ 6.0
只更改了文件位置
编译提示
--------------------Configuration: practise1newfileandcalculate - Win32 Debug--------------------
Compiling...
practise1newfileandcalculate.cpp
g:\practise\c++\practise1newfileandcalculate.cpp(9) : error C2676: binary '>>' : 'class std::basic_ostream<char,struct std::char_traits<char> >' does not define this operator or a conversion to a type acceptable to the predefined operator
执行 cl.exe 时出错.