当前位置:
文档之家› 学生选课管理系统(全源代码,Linux环境)
学生选课管理系统(全源代码,Linux环境)
__list_add(add, head, head->next);
}
_INLINE_ void list_add_tail(struct list_head *add, struct list_head *head)
{
__list_add(add, head->prev, head);
}
_INLINE_ void __list_del(struct list_head *prev, struct list_head *next)
void adm_nextmenu();//管理员2级菜单
void a_updt_stuinfo();//操作学生信息
void a_updt_tecinfo();//操作老师信息
void a_updt_myinfo();//操作管理员自身信息
void a_add_stuinfo();//添加学生信息
void a_add_tecinfo();//添加老师信息
void a_mdify_stuinfo();//修改学生信息
void a_del_info(char flag);//删除信息
void a_mdify_tecinfo();//修改老师信息
void a_seek_stuinfo();//查找学生信息
{
struct list_head *first = list->next;
if (first != list) {
struct list_head *last = list->prev;
struct list_head *at = head->next;
first->prev = head;
head->next = first;
void a_seek_info(char flag);//查找信息
void a_mdify_info(char flag);//修改学生或老师信息
void stu_nextmenu(int tmpid);//学生菜单
void tec_nextmenu(int tmpid);//老师菜单
void s_show_myinfo(int tmpid);//学生显示自己信息
{
__list_del(entry->prev, entry->next);
INIT_LIST_HEAD(entry);
}
_INLINE_ int list_empty(struct list_head *head)
{
return head->next == head;
}
_INLINE_ void list_splice(struct list_head *list, struct list_head *head)
//入口main函数
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
#include"head.h"
LIST_HEAD(stu);
LIST_HEAD(tec);
int main()
{
readf();
system("clear");
}ADM;
ADM use[1];
void gettime();//获取当前时间
void main_menu();//主菜单
void stu_login();//学生登录
void openf (char *filename);//判断文件是否存在
void tec_login();//老师登录
void adm_login();//管理员登录
void a_chpsword();
#endif
//*************************************************************************
//***********************************************************************
intSTU_grade;//年级
intSTU_place;//名次
charSTU_name[32];//姓名
charSTU_psword[32];//密码
SUBsubject[3];
structlist_headlist;
}STU;
//教师信息:
typedef struct TCH_info
{
intTCH_id;//工号
last->next = at;
at->prev = last;
}
}
#define list_entry(ptr, type, member) \
((type *)((char *)(ptr) - (unsigned long)(&((type *)0)->member)))
#define list_for_each(pos, head) \
#define _INLINE_ static inline
struct list_head {
struct list_head *next, *prev;
};
#define LIST_HEAD_INIT(name) {&(name), &(name)}
#define LIST_HEAD(name) \
void a_seek_tecinfo();//查找老师信息
void show (char flag);//显示信息
void save (char flag,char system);//保存信息
void check(char flag);//验证密码
void commom();//公用函数集合
void a_show(char flag);//显示信息
printf("\t\t###############################################\n\n");
printf("\t\t++++++++++++++++++++++++++++++++++++++++++++++++++\n");
printf("\t\t==1.学生==\n");
//*************************************************************
//*********************************************************
//list.h文件
#ifndef _LIST_H
#define _LIST_H
intSUB_csscore;//科目学分
charSUB_csname[32];//科目名称
structlist_headlist;
}SUB;
//学生信息
typedef struct STU_info
{
floatSTU_totalscore;//总分
intSTU_id;//学号
intSTU_age;//年龄
char hc;
system("clear");
gettime();
printf("\t\t\t==学生信息管理系统==\n\n");
printf("\t\t###############################################\n");
printf("\t\t==*欢迎使用本系统\a*==\n");
charTCH_name[32];//姓名
charTCH_psword[32];//密码
SUBsubject[1];
structlist_headlist;
}TEC;
//管理员信息
typedef struct ADM_info
{
char ADM_usename[8];
char ADM_psword[6];
struct list_head *prev,
struct list_head *next)
{
next->prev = add;
add->next = next;
add->prev = prev;
prev->next = add;
}
_INLINE_ void list_add(struct list_head *add, struct list_head *head) {
printf("\t\t==2.教师==\n");
printf("\t\t==3.管理员==\n");
printf("\t\t==4.退出==\n");
printf("\t\t++++++++++++++++++++++++++++++++++++++++++++++++++\n");