二进制“>>”: 没有找到接受“int [5]”类型的右操作数的运算符(或没有可接受的转换)
#include<iostream>
using namespace std;
struct Student
{
int score[5];
char name[20];
};
int main()
{
Student st[5];
for(int i=0;i<5;i++)
cin>>st[i].name>>st[i].score;
for(int i=0;i<5;i++)
{
for(int j=i+1;j<5;j++)
{
if(st[j].score>st[i].score)
{
Student temp=st[i];
st[i]=st[j];
st[j]=temp;
}
}
}
for(int i=0;i<5;i++)
{
cout<<st[i].name<<st[i].score;}
return 0;
}
第12行总是显示标题所示错误……
...全文
相关推荐
Go语言string,int,int64 ,float之间类型转换方法
Go语言中int类型和string类型都是属于基本数据类型,两种类型的转化都非常简单。下面通过本文给大家分享Go语言string,int,int64 ,float之间类型转换方法,感兴趣的朋友一起看看吧
C# 运算符 ?、??、?: 各种问号的用法和说明
本文介绍C#中三种常见的问号运算符的使用方法,简单讲解给大家,希望对大家有所帮助。
C语言位运算符:与、或、异或、取反、左移和右移.docx
C语言位运算符:与、或、异或、取反、左移和右移.docx
C++隐式类型转换运算符operator type()用法详解
主要介绍了C++隐式类型转换运算符operator type()用法详解,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
int、char、double与byte类型之间相互转换
int、char、double与byte相互转换


