if (!file)break;
top++;
read[top]=s;
}
file.close();
}
void clear()
{
top=-1;
}
int addStudent(int n,char *na)//查找是否存在
{
Student *p=equal(n);
if (p==NULL)
{
top++;
read[top].addStudent(n,na);
return 1;
}
return 0;
}
Student *equal(int Studentid)//按编号查找
{
for (int i=0;i<=top;i++)
if (read[i].getnumber()==Studentid &&
read[i].gettag()==0)
{
return &read[i];
}
return NULL;
}