#include<iostream>
#include<string>
using namespace std;
class student{
public:
student(string num1, float score1)
{num=num1;score=score1;}
void get()
{count<<num<<":"<<score<<endl;}
private:
string num;
float score;
};
int main(){
int *op;
int i;
stu[6]={
student("01",98),
student("03",88),
student("05",89),
student("06",97),
student("07",87),
student("08",85)
};
op=stu;
for(i=1;i<6;i=i+2)
op[i].get();
return0;
}
4.17
最新推荐文章于 2024-04-17 23:35:34 发布