河南寿衣批发市场价格:看看C++哪错了

来源:百度文库 编辑:高校问答 时间:2024/04/25 09:13:45
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
char r,s,p,second,first;
cout<<"first=r/s/p"<<endl;
cin>>"first">>endl;
cout<<"second=r/s/p"<<endl;
cin>>"second">>endl;
if (first==second)
cout<<"Draw"<<endl;
else
{if ((first=r&&second==s)||(first==s&&second==p)||(first==p&&second==r))
cout<<"first Win"<<endl;
else cout<<"second Win"<<endl;
}
return 0;

/*C:\Documents and Settings\lenovo\桌面\Cpp5.cpp(8) : error C2679: binary '>>' : no operator defined which takes a right-hand operand of type '' (or there is no acceptable conversion)
C:\Documents and Settings\lenovo\桌面\Cpp5.cpp(10) : error C2679: binary '>>' : no operator defined which takes a right-hand operand of type '' (or there is no acceptable conversion)*/

cin>>后面可以用endl么?去掉试试

同意LS 所讲...

我晕 CIN>> 可以用 ENDL;.....