• c++学生管理系统(三)


    新建main.cpp

     1 #include<iostream>
     2 #include "student.h"
     3 
     4 using namespace std;
     5 
     6 void printMenu() {
     7     cout << "**********************************" << endl;
     8     cout << "*	0.退出" << endl;
     9     cout << "*	1.打印学生信息" << endl;
    10     cout << "*	2.添加学生信息" << endl;
    11     cout << "*	3.通过学号查询学生信息" << endl;
    12     cout << "*	4.修改学生信息" << endl;
    13     cout << "*	5.删除学生信息" << endl;
    14     cout << "*	6.清屏" << endl;
    15     cout << "**********************************" << endl;
    16     cout<< "please select:" << endl;
    17 }
    18 
    19 void keyDown() {
    20     Student *stu_head = NULL;
    21 
    22     int key;
    23     string sno;
    24     while(1) {
    25         printMenu();
    26         cin >> key;
    27         switch(key){
    28         case 0:
    29             exit(0);
    30         case 1:
    31             displayStudent(stu_head);
    32             break;
    33         case 2:
    34             stu_head = addStudent(stu_head);
    35             displayStudent(stu_head);
    36             break;
    37         case 3:
    38             searchStudent(stu_head);
    39             break;
    40         case 4:
    41             modStudent(stu_head);
    42             break;
    43         case 5:
    44             cout << "please input student no:" << endl;
    45             cin >> sno;
    46             stu_head = delStudentByNo(stu_head, sno);
    47             break;
    48         case 6:
    49             system("clear");
    50             break;
    51         default:
    52             cout << "not expected select" << endl;
    53             break;
    54         }
    55 
    56     }
    57 }
    58 
    59 int main() {
    60     keyDown();
    61     return 0;
    62 }
  • 相关阅读:
    hibernate08--OpenSessionInView
    hibernate07--关联映射
    hibernate06--参数的绑定
    hibernate05--list和iterator
    hibernate04--三种状态之间的转换
    hibernate03增删改查
    hibernate02环境的搭建
    hibernate01ORM的引入
    mongoDB
    spring-boot(三) HowTo
  • 原文地址:https://www.cnblogs.com/zhengze/p/14347976.html
Copyright © 2020-2023  润新知