xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

資源簡介

自學之后總結網上各路大神的代碼想法,做出的完整版-C語言的課程設計--新生報到系統。

資源截圖

代碼片段和文件信息

#include
#include
#include

struct?Stu//結構體?
{
int?num;
char?name[20];
char?sex[20];
int?age;
float?score[3];
struct?Stu?*next;?
}stu[100];

//////////////////////////////////////////

int?link()
{
int?t;
FILE?*fp;
fp=fopen(“student.txt““rb“);
fseek(fp0SEEK_END);
t=ftell(fp);
fclose(fp);
return?t;
}?

void?save(struct?Stu?*head)//保存到文件?
{
struct?Stu?*p;
p=head;
FILE?*fp;
if((fp=fopen(“student.txt““wb“))==NULL)
{
printf(“打開文件失敗\n“);
}
else
{
printf(“保存成功\n“);
}
fwrite(psizeof(struct?Stu)1fp);
while(p!=NULL)
{
p=p->next;
fwrite(psizeof(struct?Stu)1fp);
}
fclose(fp);
}

struct?Stu?*read()//讀取
{
int?t;
struct?Stu?*head*p*p0;
head=NULL;
FILE?*fp;
if((fp=fopen(

評論

共有 條評論