没有合适的资源?快使用搜索试试~ 我知道了~
学生信息管理系统(链表).doc
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 47 浏览量
2022-06-21
17:50:18
上传
评论
收藏 77KB DOC 举报
温馨提示
试读
13页
学生信息管理系统(链表)
资源推荐
资源详情
资源评论
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
#include<windows.h>
#include<string.h>
#define LEN sizeof(struct student)
#define DAT_FILENAME "Information.txt"
/**********************定义数据结构********************/
struct date
{
int year;
int month;
int day;
};
struct student
{
int ID;
char Name[8];
int age;
char xb;
char telephone[15];
char address[40];
struct date birthday;
char email[40];
struct student *next;
};
/*************************函数原型*********************/
void DispMainMenu();
void DisplayInformation(struct student *head);
struct student *FindstudentID(struct student *head,int findID);
struct student *FindstudentName(struct student *head,char findname[]);
struct student *InformationInput(struct student *head);
void QueryInformation(struct student *head);
struct student *EditInformation(struct student *head);
struct student *Insert(struct student *head,struct student *p);
void Save(struct student *head);
struct student *Read(struct student *head);
struct student *Delete(struct student *head,int findID);
struct student *Add(struct student *head);
void Help();
/************************显示主菜单***************************/
void DispMainMenu()
{
printf("*********************************学生信息管理系统********************
**********\n");
printf("\n");
printf("\t\t\t\t1--信息录入\n");
printf("\n");
printf("\t\t\t\t2--信息修改\n");
printf("\n");
printf("\t\t\t\t3--信息查询\n");
printf("\n");
printf("\t\t\t\t4--保存数据到文件\n");
printf("\n");
printf("\t\t\t\t5--打开数据文件\n");
printf("\n");
printf("\t\t\t\t6--文件追加\n");
printf("\n");
printf("\t\t\t\t7--帮助\n");
printf("\n");
printf("\t\t\t\t0--退出\n");
printf("\n");
printf("友情提示:初次使用请先阅读帮助\n");
printf("*************************************************************************
******\n");
printf("请选择(0-7):");/*显示主菜单*/
}
/*************************************帮助*************************************
*************/
void Help()
{
printf("\n\t\t\t 欢迎进入帮助系统!\n\n");
printf("\t1.请按照主菜单提示选择所需执行功能的数字代号!\n");
printf("\t2.所有文件请按照规范输入\n");
printf("\t3.刚开始执行程序时若需要文本文件里的数据,请先进行读取文件信息!\n");
printf("\t4.修改信息以后,请切记需要保存!\n");
printf("\n");
}
/***********************显示所有学生信息**********************/
void DisplayInformation(struct student *head)
{
struct student *p;
printf("*************************************************************************
******");
printf("\n 学号\t 姓名\t 年龄\t 性别\t 电话\t\t 地址\t 出生年月\t email\n");
p=(struct student *)malloc(LEN);
p=head;
if(head!=NULL)
while(p!=NULL)
{
printf("%-d\t%-s\t%-d\t",p->ID,p->Name,p->age);
printf("%-c\t%-s\t%-s\t",p->xb,p->telephone,p->address);
printf("%-d %d %d",p->birthday.year,p->birthday.month,p->birthday.day);
printf("\t%-s\n",p->email);
p=p->next;
}
else
printf("无数据\n");
}
/**************************查找指定学号的学生信息******************************
/
struct student *FindstudentID(struct student *head,int findID)
{
struct student *p;
p=(struct student *)malloc(LEN);
p=head;
if(head!=NULL)
while(p!=NULL)
{
if(p->ID==findID)
break;
p=p->next;
剩余12页未读,继续阅读
资源评论
omyligaga
- 粉丝: 54
- 资源: 2万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功