#include
using namespace std;
class student
{
private:
int num;
string name;
int score;
public:
student& operator=(const student& s)
{
num=s.num;
name=s.name+"*";
score=s.score;
return *this;
}
student(int n=0,string na="a",int s=0)
{
num=n;
name=na;
score=s;
}
Print()
{
cout<
};
class ArrayOfStudent
{
public:
ArrayOfStudent(int n)
{
numberOfstudent=n;
stu=new student[n];
}
~ArrayOfStudent()
{
numberOfstudent=0;
delete[] stu;
}
student& operator[](const int n)
{
return stu[n];
}
private:
student *stu;
int numberOfstudent;
};
void main()
{
int n,i;
int num,score;
string name;
student b,c;
c=b;
b.Print();
c.Print();
cin>>n;
ArrayOfStudent a(n);
for(i=0;i
cin>>num>>name>>score;
student d(num,name,score);
a[i]=d;
}
for(i=0;i
}