#include "stuHead.h"
#define StudentCount 100
/**********************************************
*Function Name:delete
*Description:删除学生信息
*Date:07/11/28
*parameter:stuArray[MAXSIZE]
*Author:Wen He
***********************************************/
void Delete(Student stuArray[]) /*按姓名查找删除*/
{
char number[20];
int i,j;
printf("请输入要删除的学生的名字:\n");
scanf("%s",number);
for(i=0;i<StudentCount;i++)
{
while(strcmp(stuArray[i].no,number)==0)
strcpy(stuArray[i].no,stuArray[i+1].no);
for(j=0;j<MAXSUB;j++)
{strcpy(stuArray[i].score[j],stuArray[i].score[j+1]);
strcpy(stuArray[i].sum,stuArray[i+1].sum);
strcpy(stuArray[i].average[j],stuArray.average[j+1]);}
}
StudentsCount--;
printf("删除成功");
}