C语言学生管理系统
1 /* 2 主函数 3 时间:2015/04/11 4 */ 5 #include "menu.h" 6 #include "student.h" 7 #include "teacher.h" 8 #include "manager.h" 9 static int init(void); // 初始化函数 10 static void destroy_all(void); //销毁全部链表 11 int main(void) 12 { 13 int ret; 14 printf("\033[?25l"); 15 ret = init(); 16 if(ret != 0) 17 { 18 printf("init_error %d\n",ret); 19 return -1; 20 } 21 22 menu_operation(); 23 //结束操作,销毁全部链表 24 destroy_all(); 25 } 26 27 28 //初始化函数 29 static int init(void) 30 { 31 //1管理员信息初始化 32 if(init_manager() != 0) 33 { 34 return -1; 35 } 36 //2教师信息初始化 37 if(init_student() != 0) 38 { 39 return -2; 40 } 41 //3学生信息初始化 42 if(init_teacher() != 0) 43 { 44 return -3; 45 } 46 return 0; 47 48 } 49 static void destroy_all(void) 50 { 51 //管理员链表销毁 52 destroy_manager(); 53 //教师链表销毁 54 destroy_teacher(); 55 //学生链表销毁 56 destroy_student(); 57 CLEAR_SCREEN(); 58 printf("\033[34m\033[2;60H%s\033[0m","感谢您的使用谢谢!\n"); 59 getchar(); 60 getchar(); 61 printf("\033[?25h"); 62 }
- 1
- 粉丝: 21
- 资源: 1
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助