error C2676: binary '<<' : 'class std::basic_istream<char,struct std::char_traits<char> >' does not
#include<iostream>usingnamespacestd;intmain(){intx,y;cin<<x;if(x<1)y=x;elseif(x>=1&&x...
#include <iostream>
using namespace std;
int main( )
{int x,y;
cin<<x;
if (x<1) y=x;
else if (x>=1&&x<10) y=2*x-1;
else y=3*x-11;
cout<<"y="<<y<<endl;
return 0;
}
编译出来错误为:error C2676: binary '<<' : 'class std::basic_istream<char,struct std::char_traits<char> >' does not define this operator or a conversion to a type acceptable to the predefined operator
执行 cl.exe 时出错. 展开
using namespace std;
int main( )
{int x,y;
cin<<x;
if (x<1) y=x;
else if (x>=1&&x<10) y=2*x-1;
else y=3*x-11;
cout<<"y="<<y<<endl;
return 0;
}
编译出来错误为:error C2676: binary '<<' : 'class std::basic_istream<char,struct std::char_traits<char> >' does not define this operator or a conversion to a type acceptable to the predefined operator
执行 cl.exe 时出错. 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询