标题:no operator defined which takes a right-hand operand of type 'const ch ...
取消只看楼主
蔡君君
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2016-10-31
结帖率:100%
已结贴  问题点数:15 回复次数:2 
no operator defined which takes a right-hand operand of type 'const char' (or th
#include <iostream.h>
int maxmum(int ia[5][4]);

int main()
{
int a[5][4];
int i,j,m,n;
cout <<"please input grade:";
for(i=0;i<5;i++)
{for(j=0;j<4;j++)
      cin >>a[i][i]>>' ';
      cout <<a[i][j]<<' ';
cout<<endl;
}
maxmum(a);
 


}
int maxmum(int ia[5][4])                  
{
int i,j;
int m=0;
int n=0;
int max=0;
for(i=0;i<5;i++)
  for(j=0;j<4;j++)
  {
  if(ia[i][j]>max)
  {max=ia[i][j];
   m=i;
   n=j;}
  }
cout<<"student number is"<<m<<endl;
cout<<"course number is"<<n<<endl;
}
为什么它老提示:error C2679: binary '>>' : no operator defined which takes a right-hand operand of type 'const char' (or there is no acceptable conversion)
搜索更多相关主题的帖子: include please number 
2016-11-03 13:43
蔡君君
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2016-10-31
得分:0 
回复 3楼 rjsp
我把#include <iostream.h>改成#include <iostream>  
                             using namespace std;它还是提示no operator defined which takes a right-hand operand of type 'const char' (or there is no acceptable conversion)。
2016-11-03 16:50
蔡君君
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2016-10-31
得分:0 
回复 4楼 书生牛犊
??我打的是 cin>>呐
2016-11-03 16:52



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-470648-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.643869 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved