求解答,本人有一学生成绩管理系统在VC++6.0里运行总出错,我总找不到

来源:百度知道 编辑:UC知道 时间:2024/05/17 22:27:16
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "conio.h"
#include "mem.h"
#include "ctype.h"
#include "alloc.h"
struct score
{int mingci;
char xuehao[8];
char mingzi[20];
float score[6];
}data,info[1000];
int i,j,k=0;
char temp[20],ch;
FILE *fp,*fp1;
void shuru()
{if((fp=fopen("s_score.txt","ab+"))==NULL)
{printf("cannot open this file.\n");
getch();exit(0);}
for(i=0;i<=1000;i++)
{printf("\nPlease shuru xuehao:");
gets(data.xuehao);
printf("Please shuru mingzi:");
gets(data.mingzi);
printf("Please shuru yuwen score:");
gets(temp);data.score[0]=atof(temp);
printf("Please shuru shuxue score:");
gets(temp);data.score[1]=atof(temp);

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
#include <ctype.h>
void alloc(int size);
struct score
{int mingci;
char xuehao[8];
char mingzi[20];
float score[6];
}data,info[1000];
int i,j,k=0;
char temp[20],ch;
FILE *fp,*fp1;
void shuru()
{if((fp=fopen("s_score.txt","ab+"))==NULL)
{printf("cannot open this file.\n");
getch();exit(0);}
for(i=0;i<=1000;i++)
{printf("\nPlease shuru xuehao:");
gets(data.xuehao);
printf("Please shuru mingzi:");
gets(data.mingzi);
printf("Please shuru yuwen score:");
gets(temp);data.score[0]=atof(temp);
printf("Please shuru shuxue score:");
gets(temp);data.score[1]=atof(temp);
printf("Please input yingyu score:");
gets(temp);data.score[2