|
|
|
@ -3,6 +3,8 @@
|
|
|
|
|
#include<malloc.h>
|
|
|
|
|
#include<windows.h>
|
|
|
|
|
|
|
|
|
|
#define BUFSIZE 20
|
|
|
|
|
|
|
|
|
|
struct node //结构体
|
|
|
|
|
{
|
|
|
|
|
int num; //学号
|
|
|
|
@ -390,9 +392,26 @@ int xiugai_i(node *head)//ͨ
|
|
|
|
|
|
|
|
|
|
void printf(node * head)//输出所有信息
|
|
|
|
|
{
|
|
|
|
|
FILE *fp;
|
|
|
|
|
char buf[BUFSIZE];
|
|
|
|
|
//打开文件
|
|
|
|
|
fp=fopen("D:\\1.txt","r");
|
|
|
|
|
//判断是否成功
|
|
|
|
|
if(NULL==fp)
|
|
|
|
|
{
|
|
|
|
|
printf("打开文件失败!");
|
|
|
|
|
}
|
|
|
|
|
//获取文件
|
|
|
|
|
while(fgets(buf,BUFSIZE,fp))
|
|
|
|
|
{
|
|
|
|
|
printf("%s",buf);
|
|
|
|
|
}
|
|
|
|
|
//关闭文件
|
|
|
|
|
fclose(fp);
|
|
|
|
|
struct node *p;
|
|
|
|
|
p=head;
|
|
|
|
|
printf(" 学号 姓名 高数 英语 c语言\n");
|
|
|
|
|
printf("\n\n新添加的学生成绩信息!");
|
|
|
|
|
printf("\n 学号 姓名 高数 英语 c语言\n");
|
|
|
|
|
while(p!=NULL)//循环条件p结点不为NULL
|
|
|
|
|
{
|
|
|
|
|
printf("---------------------------------------------\n");
|
|
|
|
@ -404,9 +423,10 @@ void printf(node * head)//
|
|
|
|
|
|
|
|
|
|
int main()//主函数
|
|
|
|
|
{
|
|
|
|
|
struct node * head;
|
|
|
|
|
|
|
|
|
|
char name[15];
|
|
|
|
|
int n;
|
|
|
|
|
struct node * head;
|
|
|
|
|
system("color 4f");
|
|
|
|
|
printf("\n*************学生成绩管理系统****************\n");
|
|
|
|
|
printf("*********************************************\n");
|
|
|
|
|