手机版

c++大作业学生信息管理系统源代码

时间:2025-07-06   来源:未知    
字号:

c++大作业学生信息管理系统源代码

学生信息管理系统源代码:

#include<iostream.h>

#include<stdlib.h>

#include<string.h>

#include<conio.h>

#include<iomanip.h>

#include<fstream.h>

struct student

{

char num[30]; int maths;

char name[30]; int chinese;

char clas[30]; int english;

int total; float average;

student *next;

};

//◆1(1)

void createlist(student * & head) //学生成绩文件导入功能(用链表储存)

{

char t[80],num0[30],name0[30],clas0[30];

int chinese0,maths0,english0;

student *s,*p;

ifstream instuf("student-score.txt",ios::in);

if (!instuf) {cerr<<"file could not be open."<<endl; abort();}

instuf.getline(t,80);

while (instuf>>num0>>name0>>clas0>>chinese0>>maths0>>english0)

{

s=new student;

strcpy(s->num,num0);strcpy(s->name,name0);strcpy(s->clas,clas0);

s->chinese=chinese0;s->maths=maths0;s->english=english0;

s->total=s->chinese+s->maths+s->english; s->average=float(s->total)/3;

if (head==NULL) head=s;

else p->next=s;

p=s;

}

p->next=NULL;

instuf.close();

c++大作业学生信息管理系统源代码.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
×
二维码
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)