My second blog, C++ language student management systems, was not written by NumberSum () for personal reasons… , the program == the biggest bright spot is not to store students’ data, but when you close the program, open the second time, before the data will still exist ==, if you need to write a student management system, this will make your eyes a bright! Then again, someone else’s writing is someone else’s writing, and if you’re lucky enough to read mine, I hope you’ll write it yourself! Nonsense not to say, paste code, source code I also put in the download, need to quickly download.

@[TOC]

1. Software effects

2. Introduction to the display software

void ShowP(a)
{
 SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
  FOREGROUND_INTENSITY | FOREGROUND_RED);/ / red
 cout << "School student Information Management System (huagou QQ/VX:2506897252 for study only)\n" << endl;
 SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
  FOREGROUND_INTENSITY | FOREGROUND_BLUE);/ / blue
 cout << "Main functions:" << endl;
 cout << "1. Establish password login (module A)" << endl;
 cout << "Verify administrator's identity with password form (can enter three times), password is correct can enter, otherwise the program ends." << endl;
 cout << "2. Establish student Achievement Tables (Module B)" << endl;
 cout << "Create new student grade files;" << endl;
 cout << "Create several student records, including name, student number, class, course, grade, including adding student records." << endl;
 cout << "3. Add student Records (Module C)" << endl;
 cout << "Add a new record to an existing student score file." << endl;
 cout << "4. Delete student Records (Module D)" << endl;
 cout << "Delete from the student record file the records of students who failed three courses;" << endl;
 cout << "Before deleting, show the names and grades of students who meet the conditions for deleting, and delete them after confirmation." << endl;
 cout << "5. Modify student information (Module E)" << endl;
 cout << "Enter the student ID and find the student record in the student record file." << endl;
 cout << "Display the student's records one by one on the screen;" << endl;
 cout << If "Y" is displayed, enter the modified data. << endl;
 cout << "Delete the original file record and save the new record;" << endl;
 cout << "6. Search by name and class (module F)" << endl;
 cout << "Enter your name to display information." << endl;
 cout << "7. Information Statistics (Module G)" << endl;
 cout << "At the same time according to the class and course statistics of each course, each class of the average score, the highest score, the lowest score; << endl;
 cout << "On the screen first show each course, corresponding to the statistics of each class." << endl;
 cout << "8. Exit the information management system and return to the operating system. H (module)" << endl;
}
Copy the code

3.① Information maintenance ② Information retrieval ③ Information statistics ④ Exit the system

int ListShow_1(a)
{
 cout << "╔ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╗ \ n";
 cout << "                     ║══  ①信息维护  ══  ②信息检索  ══║\n";
 cout << "║ ║ \ n";
 cout << "║ ═ ═ (3) information statistics ═ ═ (4) exit system ═ ═ ║ \ n";
 cout << "╚ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╝ \ n";
 MessageBoxA(NULL."Please select a feature"."Message (made by Flower Dog)", MB_OK);
 int num_1;
 cin >> num_1; // The user selects
 system("cls");
 return num_1;
}
Copy the code

4.① Set up the student score table ② Add the student record ③ Delete the student record ④ Modify the student information ⑤ View the record information ⑥ Return to the superior menu

int ListShow_2(a)
{
 cout << "╔ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╗ \ n";
 cout << "║ ═ ═ (1) to establish a student achievement table ═ ═ (2) add student record ═ ═ ║ \ n";
 cout << "║ ║ \ n";
 cout << "║ 反 错 误 误 反 错 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 ║\n";
 cout << "║ ║ \ n";
 cout << "║ 错 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 ║\n";
 cout << "╚ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╝ \ n";
 MessageBoxA(NULL."Please select the function again (do not select 1 if it is not your first use)"."Message (made by Flower Dog)", MB_OK);
 int num_2;
 cin >> num_2; // The user selects
 p = &num_2;
 system("cls");
 return num_2;
}
Copy the code

5.① Search by name ② Search by class ③ Return to superior menu

int ListShow_3(a)
{
 cout << "╔ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╗ \ n";
 cout << "║ ═ ═ (1) according to the name lookup ═ ═ (2) according to class lookup ═ ═ ║ \ n";
 cout << "║ ║ \ n";
 cout << "║═ 错 误 误 ③ Return to upper menu ║\n";
 cout << "╚ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╝ \ n";
 MessageBoxA(NULL."Please select the feature again"."Message (made by Flower Dog)", MB_OK);
 int num_2;
 cin >> num_2; // The user selects
 p = &num_2;
 system("cls");
 return num_2;
}
Copy the code

6.① Score statistics ② Return to superior menu

int ListShow_4(a)
{
 cout << "╔ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╗ \ n";
 cout << "║ ═ ═ (1) performance statistics ═ ═ (2) return to the higher level menu ═ ═ ║ \ n";
 cout << "╚ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╝ \ n";
 MessageBoxA(NULL."Please select the feature again"."Message (made by Flower Dog)", MB_OK);
 int num_2;
 cin >> num_2; // The user selects
 p = &num_2;
 system("cls");
 return num_2;
}
Copy the code

7. Establish student achievement tables

void FoundStudent(char *File_system)
{
 char File_[100];          // Customize the file address
 char Name_[20];           // File name
 int  number[9] = { 31.31.31.31.31.31.31.31.31 };// Subject selection
 int  sum = 0;          / / number of subjects
 cout << "Please enter the file save address (e.g. D:\\ my software \\ student Management system address do not have Spaces)";
 cin >> File_;
 if (_access(File_, 00) = =0)
 {
  MessageBoxA(NULL."Address specified successfully!"."Welcome to use", MB_OK);
 }
 else
 {
  MessageBoxA(NULL."Entered path does not exist, created path for you! Next please enter the file name (filename suffix please write.ini).."Welcome to use", MB_OK);
  _mkdir(File_);// If there is no specified folder in the path, create the folder
 }
 cout << "Please enter a file name :";
 cin >> Name_;
 strcat(File_, "\ \");
 strcat(File_, Name_);// Copy the file name to the end of the path
 system("cls");
 cout << "╔ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╗ \ n";
 cout << "║ ═ ═ (1) the language ═ ═ (2) mathematical ═ ═ ═ (3) English political ═ ═ (4) ═ ║ \ n";
 cout << "║ ║ \ n";
 cout << "║ ═ ═ (5) history ═ ═ 6 geographic ═ ═ all landowners biological ═ ═ end physical ═ ═ ║ \ n";
 cout << "║ ║ \ n";
 cout << "║═ 反 应 ⑨ 反 应 ║\n";
 cout << "╚ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╝ \ n";
 MessageBoxA(NULL."Please select subjects (select one time press enter \n select at least three subjects \n If not select please enter 0)"."Welcome to use", MB_OK);
 ofstream fout_1(File_);// The default call is explicitly ofstream fout.open(File_);
 fout_1.close();
 ofstream fout(File_system);
 fout << "[FILE]" << endl;// Set the file address and name
 fout << "Address =" << File_ << endl;
 fout << "[SUBGECT]" << endl;// Set the subject
 for (int i = 0; i < 9; i++)
 {
  cin >> number[i];
  if(number[i] ! =0)sum += 1;
  if (number[i] == 0)
  {
   number[i] = 31;
   break; }}for (int i = 0; i < 9; i++)
 {
  fout << "Subject Code" << i + 1 << "=" << number[i] << endl;
 }
 fout << "Total number of subjects =" << sum << endl;
 fout << "[Number of persons recorded]" << endl;
 fout << "total=0" << endl;
 fout << "[is it opened for the first time]" << endl;
 fout << "Frist=1" << endl;
 fout << "[Is it first recorded]" << endl;
 fout << "F=0" << endl;
 fout.close();
 cout << "Student transcripts have been established." << endl;
 cout << "Add student info now (1), return to upper menu (0)" << endl;
 int CinJ = 0;
 cin >> CinJ;
 if (CinJ == 1)
 {
  system("cls");
  AddStudent(File_system);
 }
 // When the program ends, it returns to the previous level
}
Copy the code

8. Add student records

void AddStudent(char * File_system)
{
 char * Studata = NULL;
 Studata = new char[20];/ / information
 char * NUM_1 = NULL;
 NUM_1 = new char[100];
 char File_[100];  // Read the file address
 int ReturnSu = 0; // Read the number of subjects
 int total;        // The total number of people reading records
 char * total_f = NULL;
 total_f = new char[1000];
 GetPrivateProfileStringA("FILE"."Address"."Unknown", File_, sizeof(File_), File_system);
 ReturnSu = GetPrivateProfileIntA("SUBGECT"."Total number of subjects".- 1, File_system);
 total = GetPrivateProfileIntA("Record number"."total".- 1, File_system);
 int number[9];// Store the items saved in the File_system configuration file
 for (int i = 0; i < 9; i++) // Provide data for number
 {
  char Name[30] = "Subject Code";
  if (i == 0)
  {
   char   NUM[3] = "1";
   strcat(Name, NUM);
  }
  if (i == 1)
  {
   char   NUM[3] = "2";
   strcat(Name, NUM);
  }
  if (i == 2)
  {
   char   NUM[3] = "3";
   strcat(Name, NUM);
  }
  if (i == 3)
  {
   char   NUM[3] = "4";
   strcat(Name, NUM);
  }
  if (i == 4)
  {
   char   NUM[3] = "5";
   strcat(Name, NUM);
  }
  if (i == 5)
  {
   char   NUM[3] = "6";
   strcat(Name, NUM);
  }
  if (i == 6)
  {
   char   NUM[3] = "Seven";
   strcat(Name, NUM);
  }
  if (i == 7)
  {
   char   NUM[3] = "8";
   strcat(Name, NUM);
  }
  if (i == 8)
  {
   char   NUM[3] = "9";
   strcat(Name, NUM);
  }
  char *stu_ = Name;
  number[i] = GetPrivateProfileIntA("SUBGECT", stu_, - 1, File_system);
 }
 cout << "Subject selected, please record student information in the following format :\n";
 SubjectJudge(number); // Displays what needs to be entered
 MessageBoxA(NULL."Please enter \n in strict accordance with the above information sequence \n After entering the student information, press Enter \n Please separate the input information with Spaces \n If you do not enter the next student information, please enter \"T\" End"."Tip", MB_OK);
 ofstream fout(File_, ios::ate | ios::app);  // Read the file
 for (int j = total + 1; j <= 1000; j++)
 {
  sprintf(NUM_1, "%d", j);
  if (strcmp(Studata, "T") = =0)
  {
   break;
  }
  for (int i = 1; i <= ReturnSu + 3; i++)
  {
   cin >> Studata;
   if (i == 1)
   {
    if (strcmp(Studata, "T") = =0) // Exit if T is entered
    {
     break;
    }
    WritePrivateProfileStringA(NUM_1, "Name", Studata, File_);
    total += 1;
    sprintf(total_f, "%d", total); //int to string
    WritePrivateProfileStringA("Record number"."total", total_f, File_system);
   }
   if (i == 2)
   {
    WritePrivateProfileStringA(NUM_1, "Student id", Studata, File_);
   }
   if (i == 3)
   {
    WritePrivateProfileStringA(NUM_1, "Class", Studata, File_);
   }
   if (i == 4)
   {
    WritePrivateProfileStringA(NUM_1, "Chinese", Studata, File_);
   }
   if (i == 5)
   {
    WritePrivateProfileStringA(NUM_1, "Mathematics", Studata, File_);
   }
   if (i == 6)
   {
    WritePrivateProfileStringA(NUM_1, "English", Studata, File_);
   }
   if (i == 7)
   {
    WritePrivateProfileStringA(NUM_1, "Political", Studata, File_);
   }
   if (i == 8)
   {
    WritePrivateProfileStringA(NUM_1, "History", Studata, File_);
   }
   if (i == 9)
   {
    WritePrivateProfileStringA(NUM_1, "Geography", Studata, File_);
   }
   if (i == 10)
   {
    WritePrivateProfileStringA(NUM_1, "Creatures", Studata, File_);
   }
   if (i == 11)
   {
    WritePrivateProfileStringA(NUM_1, "Physical", Studata, File_);
   }
   if (i == 12)
   {
    WritePrivateProfileStringA(NUM_1, "Chemistry", Studata, File_);
   }
   WritePrivateProfileStringA("Is it the first record?"."F"."1", File_system);
  }
 }
 fout.close(); // Close the file
 delete[]Studata;
 delete[]NUM_1;
 delete[]total_f;
 cout << "Information has been entered." << endl;
 cout << "Return to upper-level menu (any key)" << endl;
 int e;
 cin >> e;
}
Copy the code

9. Delete student records

void DeleteStudent(char * File_system)
{
 char File_[100];  // Read the file address
 int total;        // The total number of people reading records
 int N;            // Get the number of subjects
 int F;            // Get the record
 char CH[10];      // Get the character class type
 int  IN_;         // The number type to get
 int * percase = NULL;  // Record delete label
 percase = new int[sizeof(int) * 100];
 int persum = 0;   // Record the number of deletions
 char * SuIT = NULL;
 SuIT = new char[20];
 GetPrivateProfileStringA("FILE"."Address"."Unknown", File_, sizeof(File_), File_system);
 total = GetPrivateProfileIntA("Record number"."total".- 1, File_system);
 N = GetPrivateProfileIntA("SUBGECT"."Total number of subjects".- 1, File_system);
 F = GetPrivateProfileIntA("Is it the first record?"."F".- 1, File_system);
 if (F == - 1)MessageBoxA(NULL."You have not recorded any student information and cannot delete it."."News", MB_OK);
 if (F == 0) MessageBoxA(NULL."You have not recorded any student information and cannot delete it."."News", MB_OK);
 if (F == 1)
 {
  for (int j = 1; j <= total; j++)
  {
   int sum = 0;      // Unqualified subject
   char Delename[50] = "";
   for (int i = 1; i <= N + 3; i++)
   {
    char CH_F[10];// Alphanumeric
    sprintf(SuIT, "%d", j);
    if (i == 1)
    {
     GetPrivateProfileStringA(SuIT, "Name"."Unknown", CH, sizeof(CH), File_);
     strcat(Delename, CH);
     strcat(Delename, "");
    }
    if (i == 2)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Student id".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
    }
    if (i == 3)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Class".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
    }
    if (i == 4)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Chinese".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
     if (IN_ <= 60)
      sum += 1;
    }
    if (i == 5)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Mathematics".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
     if (IN_ <= 60)sum += 1;
    }
    if (i == 6)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "English".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
     if (IN_ <= 60)sum += 1;
    }
    if (i == 7)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Political".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
     if (IN_ <= 60)sum += 1;
    }
    if (i == 8)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "History".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
     if (IN_ <= 60)sum += 1;
    }
    if (i == 9)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Geography".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
     if (IN_ <= 60)sum += 1;
    }
    if (i == 10)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Creatures".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
     if (IN_ <= 60)sum += 1;
    }
    if (i == 11)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Physical".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
     if (IN_ <= 60)sum += 1;
    }
    if (i == 12)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Chemistry".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
     if (IN_ <= 60)sum += 1; }}if (sum >= 3) // Print the student's information if more than three subjects are failed
   {
    cout << Delename;
    cout << endl;
    percase[persum] = j;/ / 012
    persum += 1;// Delete number of people //123 //BUG appears}}}if (IDYES == MessageBoxA(NULL."Delete \n Press \" yes" "Confirm deletion"."Message (made by Flower Dog)", MB_YESNO))
 {
  for (int j = 1; j <= persum; j++)
  {
   char LS[10];
   sprintf(LS, "%d", percase[j - 1]);
   WritePrivateProfileStringA(LS, NULL.NULL, File_); }}else
 {
  cout << "You have cancelled deletion......";
 }
 delete[]percase;
 delete[]SuIT;
 cout << "Information processed (return to menu with any key)" << endl;
 int e;
 cin >> e;
}
Copy the code

10. Modify student information

void ChooesStudent(char * File_system)
{
 int Stunumer = 0;  // Get the student id
 char File_[100];  // Read the file address
 char CH[10];      // Get the character class type
 int  IN_;          // The number type to get
 char CH_[20];
 int total;        // The total number of people reading records
 int N;            // Get the number of subjects
 char * SuIT = NULL;
 SuIT = new char[20];
 int a = 0;        // If there is no information about the student id, then a is 0
 char CH_1[20];
 GetPrivateProfileStringA("FILE"."Address"."Unknown", File_, sizeof(File_), File_system);
 total = GetPrivateProfileIntA("Record number"."total".- 1, File_system);
 N = GetPrivateProfileIntA("SUBGECT"."Total number of subjects".- 1, File_system);
 cout << "Input student number to modify student information \n";
 cin >> Stunumer;
 for (int j = 1; j <= total; j++)
 {
  sprintf(CH_1, "%d", j);
  a = GetPrivateProfileIntA(CH_1, "Student id".- 1, File_);
  if (Stunumer == a)
  {
   for (int i = 1; i <= N + 3; i++)
   {
    sprintf(SuIT, "%d", j);
    if (i == 1)
    {
     GetPrivateProfileStringA(SuIT, "Name"."error", CH, sizeof(CH), File_);
     cout << "Name:";
     cout << CH << endl;
    }
    if (i == 2)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Student id".- 1, File_);
     cout << "Student number.";
     cout << IN_ << endl;
    }
    if (i == 3)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Class".- 1, File_);
     cout << "Class.";
     cout << IN_ << endl;
    }
    if (i == 4)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Chinese".- 1, File_);
     if (IDYES == MessageBoxA(NULL."Whether to modify language score \n press \" Yes \" Modify Press \" no \" to proceed to the next modification"."News", MB_YESNO))
     {
      cin >> IN_;
      sprintf(CH_, "%d", IN_);
      WritePrivateProfileStringA(SuIT, "Chinese", CH_, File_); }}if (i == 5)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Mathematics".- 1, File_);
     if (IDYES == MessageBoxA(NULL."Whether to modify math score \n press \" yes \" modify press \" no \" to proceed to the next modification"."News", MB_YESNO))
     {
      cin >> IN_;
      sprintf(CH_, "%d", IN_);
      WritePrivateProfileStringA(SuIT, "Mathematics", CH_, File_); }}if (i == 6)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "English".- 1, File_);
     if (IDYES == MessageBoxA(NULL."Whether to modify English score \n press \" Yes \" modify press \" no \" to proceed to the next modification"."News", MB_YESNO))
     {
      cin >> IN_;
      sprintf(CH_, "%d", IN_);
      WritePrivateProfileStringA(SuIT, "English", CH_, File_); }}if (i == 7)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Political".- 1, File_);
     if (IDYES == MessageBoxA(NULL."Whether to modify political score \n press \" Yes \" modify press \" no \" to proceed to the next modification"."News", MB_YESNO))
     {
      cin >> IN_;
      sprintf(CH_, "%d", IN_);
      WritePrivateProfileStringA(SuIT, "Political", CH_, File_); }}if (i == 8)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "History".- 1, File_);
     if (IDYES == MessageBoxA(NULL."Do YOU want to modify your historical score?" press "Yes". "Modify" Press "no" to proceed to the next modification."."News", MB_YESNO))
     {
      cin >> IN_;
      sprintf(CH_, "%d", IN_);
      WritePrivateProfileStringA(SuIT, "History", CH_, File_); }}if (i == 9)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Geography".- 1, File_);
     if (IDYES == MessageBoxA(NULL."Change geography score \n press \" Yes \" Change press \" no \" to go to the next change"."News", MB_YESNO))
     {
      cin >> IN_;
      sprintf(CH_, "%d", IN_);
      WritePrivateProfileStringA(SuIT, "Geography", CH_, File_); }}if (i == 10)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Creatures".- 1, File_);
     if (IDYES == MessageBoxA(NULL."Whether to modify biological grade \n press \" Yes \" Modify press \" no \" to proceed to the next modification"."News", MB_YESNO))
     {
      cin >> IN_;
      sprintf(CH_, "%d", IN_);
      WritePrivateProfileStringA(SuIT, "Creatures", CH_, File_); }}if (i == 11)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Physical".- 1, File_);
     if (IDYES == MessageBoxA(NULL."Do YOU want to modify your physics grade? Press" "Yes" "Modify" press "" No" "to proceed to the next modification"."News", MB_YESNO))
     {
      cin >> IN_;
      sprintf(CH_, "%d", IN_);
      WritePrivateProfileStringA(SuIT, "Physical", CH_, File_); }}if (i == 12)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Chemistry".- 1, File_);
     if (IDYES == MessageBoxA(NULL."Whether to modify chemistry grade \n press \" Yes \" modify press \" no \" to proceed to the next modification"."News", MB_YESNO))
     {
      cin >> IN_;
      sprintf(CH_, "%d", IN_);
      WritePrivateProfileStringA(SuIT, "Chemistry", CH_, File_); } } } ++a; }}delete[]SuIT;
 cout << "Information has been modified (any key returns to menu)" << endl;
 int e;
 cin >> e;
}
Copy the code

11. Search by class

void ClassSeatch(char * File_system)
{
 int Stunumer = 0;  // Get the class of students
 char File_[100];  // Read the file address
 char CH[10];      // Get the character class type
 char CH_1[20];
 int  IN_;          // The number type to get
 int total;        // The total number of people reading records
 int N = 0;            // Get the number of subjects
 char * SuIT = NULL;
 SuIT = new char[20];
 int a = 0;        // If there is no information about the student id, then a is 0
 int b = 0;        // Check if it is found
 GetPrivateProfileStringA("FILE"."Address"."Unknown", File_, sizeof(File_), File_system);
 total = GetPrivateProfileIntA("Record number"."total".- 1, File_system);
 N = GetPrivateProfileIntA("SUBGECT"."Total number of subjects".- 1, File_system);
 cout << "Enter student class to view student information \n";
 while (1)
 {
  cin >> Stunumer; // Get the class
  for (int j = 1; j <= total; j++)
  {
   sprintf(CH_1, "%d", j);
   a = GetPrivateProfileIntA(CH_1, "Class".- 1, File_);
   if (Stunumer == a)
   {
    for (int i = 1; i <= N + 3; i++)
    {
     sprintf(SuIT, "%d", j);
     if (i == 1)
     {
      GetPrivateProfileStringA(SuIT, "Name"."error", CH, sizeof(CH), File_);
      cout << "Name:";
      cout << CH << endl;
     }
     if (i == 2)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Student id".- 1, File_);
      cout << "Student number.";
      cout << IN_ << endl;
     }
     if (i == 3)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Class".- 1, File_);
      cout << "Class.";
      cout << IN_ << endl;
     }
     if (i == 4)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Chinese".- 1, File_);
      cout << "The language.";
      cout << IN_ << endl;
     }
     if (i == 5)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Mathematics".- 1, File_);
      cout << "Math.";
      cout << IN_ << endl;
     }
     if (i == 6)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "English".- 1, File_);
      cout << "English.";
      cout << IN_ << endl;
     }
     if (i == 7)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Political".- 1, File_);
      cout << "Political.";
      cout << IN_ << endl;
     }
     if (i == 8)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "History".- 1, File_);
      cout << "History.";
      cout << IN_ << endl;
     }
     if (i == 9)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Geography".- 1, File_);
      cout << "Geographical.";
      cout << IN_ << endl;
     }
     if (i == 10)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Creatures".- 1, File_);
      cout << "Life.";
      cout << IN_ << endl;
     }
     if (i == 11)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Physical".- 1, File_);
      cout << "Physical.";
      cout << IN_ << endl;
     }
     if (i == 12)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Chemistry".- 1, File_);
      cout << "Chemistry.";
      cout << IN_ << endl;
     }
    }
    b = 1; }}if (b == 0)
  {
   cout << "You entered the wrong class or no one is in that class." << endl;
   cout << "Do you want to search by name? If yes, press 1. If you want to search by class, press 2. << endl;
   int w;
   cin >> w;
   if (w == 1)
   {
    NameSeatch(File_system);
   }
   if (w == 2) {}if(w ! =1&& w ! =2)
   {
    cout << "tuichu";
    break; }}}delete[]SuIT;
}
Copy the code

12. Search by name

void NameSeatch(char * File_system)
{
 char Stunumer[10];  // Get the student's name
 char File_[100];  // Read the file address
 char CH[10];      // Get the character class type
 char CH_[20];
 char CH_1[20];
 int  IN_;          // The number type to get
 int total;        // The total number of people reading records
 int N;            // Get the number of subjects
 char * SuIT = NULL;
 SuIT = new char[20];
 int a = 0;        // If there is no information about the student id, then a is 0
 int b = 0;
 GetPrivateProfileStringA("FILE"."Address"."Unknown", File_, sizeof(File_), File_system);
 total = GetPrivateProfileIntA("Record number"."total".- 1, File_system);
 N = GetPrivateProfileIntA("SUBGECT"."Total number of subjects".- 1, File_system);
 cout << "Enter student name to view student information \n";
 while (1)
 {
  cin >> Stunumer;
  b = 0;
  for (int j = 1; j <= total; j++)
  {
   sprintf(CH_1, "%d", j);
   GetPrivateProfileStringA(CH_1, "Name"."Unknown", CH_, sizeof(CH_), File_);
   if (strcmp(Stunumer, CH_) == 0)
   {
    for (int i = 1; i <= N + 3; i++)
    {
     sprintf(SuIT, "%d", j);
     if (i == 1)
     {
      GetPrivateProfileStringA(SuIT, "Name"."error", CH, sizeof(CH), File_);
      cout << "Name:";
      cout << CH << endl;
     }
     if (i == 2)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Student id".- 1, File_);
      cout << "Student number.";
      cout << IN_ << endl;
     }
     if (i == 3)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Class".- 1, File_);
      cout << "Class.";
      cout << IN_ << endl;
     }
     if (i == 4)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Chinese".- 1, File_);
      cout << "The language.";
      cout << IN_ << endl;
     }
     if (i == 5)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Mathematics".- 1, File_);
      cout << "Math.";
      cout << IN_ << endl;
     }
     if (i == 6)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "English".- 1, File_);
      cout << "English.";
      cout << IN_ << endl;
     }
     if (i == 7)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Political".- 1, File_);
      cout << "Political.";
      cout << IN_ << endl;
     }
     if (i == 8)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "History".- 1, File_);
      cout << "History.";
      cout << IN_ << endl;
     }
     if (i == 9)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Geography".- 1, File_);
      cout << "Geographical.";
      cout << IN_ << endl;
     }
     if (i == 10)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Creatures".- 1, File_);
      cout << "Life.";
      cout << IN_ << endl;
     }
     if (i == 11)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Physical".- 1, File_);
      cout << "Physical.";
      cout << IN_ << endl;
     }
     if (i == 12)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Chemistry".- 1, File_);
      cout << "Chemistry.";
      cout << IN_ << endl;
     }
    }
    b = 1; }}if (b == 0)
  {
   cout << "You entered the wrong name or there is no student." << endl;
   cout << "Do you want to search by class? If yes, press 1. If you want to search by name, press 2. << endl;
   int w;
   cin >> w;
   if (w == 1)
   {
    ClassSeatch(File_system);
   }
   if (w == 2) {}if(w ! =1&& w ! =2)
   {
    cout << "tuichu";
    break; }}}delete[]SuIT;
}
Copy the code

13. Performance Statistics (blank)

14. Display information about existing students

void ShowNew(char * File_system)
{
 char File_[100];  // Read the file address
 int total;        // The total number of people reading records
 int N;            // Get the number of subjects
 int F;            // Get the record
 char CH[10];      // Get the character class type
 int  IN_;          // The number type to get
 char * SuIT = NULL;
 SuIT = new char[20];
 GetPrivateProfileStringA("FILE"."Address"."Unknown", File_, sizeof(File_), File_system);
 total = GetPrivateProfileIntA("Record number"."total".- 1, File_system);
 N = GetPrivateProfileIntA("SUBGECT"."Total number of subjects".- 1, File_system);
 F = GetPrivateProfileIntA("Is it the first record?"."F".- 1, File_system);
 if (F == - 1)MessageBoxA(NULL."You didn't record any student information."."News", MB_OK);
 if (F == 0) MessageBoxA(NULL."You didn't record any student information."."News", MB_OK);
 if (F == 1)
 {
  for (int j = 1; j <= total; j++)
  {
   int a = 0;
   for (int i = 1; i <= N + 3; i++)
   {
    sprintf(SuIT, "%d", j);
    if (i == 1)
    {
     GetPrivateProfileStringA(SuIT, "Name"."error", CH, sizeof(CH), File_);
     if (strcmp(CH, "error") != 0)cout << CH << "";
     else ++a;
    }
    if (i == 2)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Student id".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << "";
    }
    if (i == 3)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Class".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << "";
    }
    if (i == 4)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Chinese".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << "";
    }
    if (i == 5)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Mathematics".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << "";
    }
    if (i == 6)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "English".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << "";
    }
    if (i == 7)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Political".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << "";
    }
    if (i == 8)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "History".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << "";
    }
    if (i == 9)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Geography".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << "";
    }
    if (i == 10)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Creatures".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << "";
    }
    if (i == 11)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Physical".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << "";
    }
    if (i == 12)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Chemistry".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << ""; }}if (a == 0)cout << endl; }}delete[]SuIT;
 cout << "Information has been viewed (any key to return to menu)" << endl;
 int e;
 cin >> e;
}
Copy the code

15. Output user-defined content

void SubjectJudge(int * number)
{
 cout << "Name, student number, class";
 for (int i = 0; i < 9; i++)
 {
  if (*(number + i) == 1)cout << "Chinese";
  if (*(number + i) == 2)cout << "Mathematics";
  if (*(number + i) == 3)cout << "English";
  if (*(number + i) == 4)cout << "Political";
  if (*(number + i) == 5)cout << "History";
  if (*(number + i) == 6)cout << "Geography";
  if (*(number + i) == 7)cout << "Creatures";
  if (*(number + i) == 8)cout << "Physical";
  if (*(number + i) == 9)cout << "Chemistry";
 }
 cout << endl;
}
Copy the code

16. Complete code attached, you can also download.


/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2019.11.07 vs2015 * flower dog student management system * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<fstream>
#include<Windows.h>
#include<io.h>
#include<direct.h>
#include<string>
int * p = NULL;  // points to num_2 in ListShow_1()
char File_system[] = "C:\\Users\\FdogMain\\Desktop\\sms.ini";// System initialization configuration files (including user created file addresses, custom accounts, etc.)
                                                             // My desktop address is this, if yours is not, please change it
void ShowP(a);           // Display software introduction
int ListShow_1(a);          //① Information maintenance ② Information retrieval ③ Information statistics ④ Exit the system
int ListShow_2(a);          //① Create student record ② add student record ③ delete student record ④ modify student information ⑤ View the record information ⑥ return to the superior menu
int ListShow_3(a);          // go back to the menu
int ListShow_4(a);          //① Score statistics ② return to the upper menu
void FoundStudent(char *File_system);     // Create a student score table
void AddStudent(char * File_system);     // Add student records
void DeleteStudent(char * File_system);     // Delete student records
void ChooesStudent(char * File_system);     // Modify student information
void ClassSeatch(char * File_system);     // Search by class
void NameSeatch(char * File_system);     // Search by name
void NumberSum(char * File_system);      // Performance statistics
void ShowNew(char * File_system);      // Display information about existing students
void SubjectJudge(int * number);      // Output user-defined content
using namespace std;

int main(a){
 const string password = "huagou"; // Set the initial password
 string password_2;            // Enter the password
 if (IDYES == MessageBoxA(NULL."Please enter the password into the system, if you forget, please contact the author QQ2506897252\n(you only have three chances to enter)"."Tip", MB_YESNO));
 // The function MessageBoxA returns a value if it is IDYES, and exits if it is not
 else exit(0); 
 for (int I_F = 3; I_F >= 1; I_F--)
 {
  getline(cin, password_2); // getLine is a function that handles string;
  system("cls");
  if (password == password_2)
  {
   MessageBoxA(NULL."Password correct"."Tip", MB_OK);
   break;
  }
  else if (I_F == 1 && IDOK == MessageBoxA(NULL."Password error"."Tip", MB_OK))
  {
   cout << "The number of times has been exhausted and has been logged out of the system.";
   system("pause>nul");
   exit(0);
  }// The last time the error directly exit
  else
  {
   MessageBoxA(NULL."Password error"."Tip", MB_OK); }}if (- 1 == GetPrivateProfileIntA("Is it open for the first time?"."Frist".- 1."C:\\Users\\FdogMain\\Desktop\\sms.ini"))
 {                             
  ShowP();
  MessageBoxA(NULL."Hello, because you are the first time to use this software \ N hope you can read carefully, if finished reading press any key into the software"."Tip", MB_OK);
  // Determine whether the user opened the program for the first time
  getchar();// Wait for the user to respond
 }
 system("cls");
 SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN | FOREGROUND_BLUE);/ / light blue
 while (1)
 {
  switch (ListShow_1())
  {
  case 1:
   get_1:
    ListShow_2();
    if (*p == 1)FoundStudent(File_system);
    if (*p == 2)AddStudent(File_system);
    if (*p == 3)DeleteStudent(File_system);
    if (*p == 4)ChooesStudent(File_system);
    if (*p == 5)ShowNew(File_system);
    if (*p == 6)break;
    system("cls");
    goto get_1;
    break;
  case 2:
   get_2:
    ListShow_3();
    if (*p == 1)NameSeatch(File_system);
    if (*p == 2)ClassSeatch(File_system);
    if (*p == 3)break;
    system("cls");
    goto get_2;
    break;
  case 3:
   get_3:
    ListShow_4();
    if (*p == 1)NumberSum(File_system);
    if (*p == 2)break;
    system("cls");
    goto get_3;
    break;
  default:
   exit(0); }}return 0;
}
void FoundStudent(char *File_system)
{
 char File_[100];        // Customize the file address
 char Name_[20];         // File name
 int  number[9] = { 31.31.31.31.31.31.31.31.31 };// Subject selection
 int  sum = 0;         / / number of subjects
 cout << "Please enter the file save address (e.g. D:\\ my software \\ student Management system address do not have Spaces)";
 cin >> File_;
 if (_access(File_, 00) = =0)
 {
  MessageBoxA(NULL."Address specified successfully!"."Welcome to use", MB_OK);
 }
 else
 {
  MessageBoxA(NULL."Entered path does not exist, created path for you! Next please enter the file name (filename suffix please write.ini).."Welcome to use", MB_OK);
  _mkdir(File_);// If there is no specified folder in the path, create the folder
 }
 cout << "Please enter a file name :";
 cin >> Name_;
 strcat_s(File_, "\ \");
 strcat_s(File_, Name_);// Copy the file name to the end of the path
 system("cls");
 cout << "╔ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╗ \ n";
 cout << "║ ═ ═ (1) the language ═ ═ (2) mathematical ═ ═ ═ (3) English political ═ ═ (4) ═ ║ \ n";
 cout << "║ ║ \ n";
 cout << "║ ═ ═ (5) history ═ ═ 6 geographic ═ ═ all landowners biological ═ ═ end physical ═ ═ ║ \ n";
 cout << "║ ║ \ n";
 cout << "║═ 反 应 ⑨ 反 应 ║\n";
 cout << "╚ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╝ \ n";
 MessageBoxA(NULL."Please select subjects (select one time press enter \n select at least three subjects \n If not select please enter 0)"."Welcome to use", MB_OK);
 ofstream fout_1(File_);  // The default call is explicitly ofstream fout.open(File_);
 fout_1.close();          
 ofstream fout(File_system);
 fout << "[FILE]" << endl; // Set the file address and name
 fout << "Address =" << File_ << endl;
 fout << "[SUBGECT]" << endl;// Set the subject
 for (int i = 0; i < 9; i++)
 {
  cin >> number[i];
  if(number[i] ! =0)sum += 1;
  if (number[i] == 0)
  {
   number[i] = 31;
   break; }}for (int i = 0; i < 9; i++)
 {
  fout << "Subject Code" << i + 1 << "=" << number[i] << endl;
 }
 fout << "Total number of subjects =" << sum << endl;
 fout << "[Number of persons recorded]" << endl;
 fout << "total=0" << endl;
 fout << "[is it opened for the first time]" << endl;
 fout << "Frist=1" << endl;
 fout << "[Is it first recorded]" << endl;
 fout << "F=0" << endl;
 fout.close();
 cout << "Student transcripts have been established." << endl;
 cout << "Add student info now (1), return to upper menu (0)" << endl;
 int CinJ = 0;
 cin >> CinJ;
 if (CinJ == 1)
 {
  system("cls");
  AddStudent(File_system);
 }
 // When the program ends, it returns to the previous level
}
void AddStudent(char * File_system)
{
 char * Studata = NULL;
 Studata = new char[20]; / / information
 char * NUM_1 = NULL;
 NUM_1 = new char[100];
 char File_[100];  // Read the file address
 int ReturnSu = 0;  // Read the number of subjects
 int total;    // The total number of people reading records
 char * total_f = NULL;
 total_f = new char[1000];
 GetPrivateProfileStringA("FILE"."Address"."Unknown", File_, sizeof(File_), File_system);
 ReturnSu = GetPrivateProfileIntA("SUBGECT"."Total number of subjects".- 1, File_system);
 total = GetPrivateProfileIntA("Record number"."total".- 1, File_system);
 int number[9];   // Store the items saved in the File_system configuration file
 for (int i = 0; i < 9; i++) // Provide data for number
 {
  char Name[30] = "Subject Code";
  switch (i)
  {
  case 1:
   Function_1(i, Name);
   break;
  case 2:
   Function_1(i, Name);
   break;
  case 3:
   Function_1(i, Name);
   break;
  case 4:
   Function_1(i, Name);
   break;
  case 5:
   Function_1(i, Name);
   break;
  case 6:
   Function_1(i, Name);
   break;
  case 7:
   Function_1(i, Name);
   break;
  case 8:
   Function_1(i, Name);
   break;
  }
  char *stu_ = Name;
  number[i] = GetPrivateProfileIntA("SUBGECT", stu_, - 1, File_system);
 }
 cout << "Subject selected, please record student information in the following format :\n";
 SubjectJudge(number); // Displays what needs to be entered
 MessageBoxA(NULL."Please enter \n in strict accordance with the above information sequence \n After entering the student information, press Enter \n Please separate the input information with Spaces \n If you do not enter the next student information, please enter \"T\" End"."Tip", MB_OK);
 ofstream fout(File_, ios::ate | ios::app);  // Read the file
 for (int j = total + 1; j <= 1000; j++)
  {
  sprintf(NUM_1, "%d", j);
  if (strcmp(Studata, "T") = =0)
  {
   break;
  }
  for (int i = 1; i <= ReturnSu + 3; i++)
  {
   cin >> Studata;
   if (i == 1)
   {
    if (strcmp(Studata, "T") = =0) // Exit if T is entered
    {
     break;
    }
    WritePrivateProfileStringA(NUM_1, "Name", Studata, File_);
    total += 1;
    sprintf(total_f, "%d", total); //int to string
    WritePrivateProfileStringA("Record number"."total", total_f, File_system);
   }
   if (i == 2)
   {
    WritePrivateProfileStringA(NUM_1, "Student id", Studata, File_);
   }
   if (i == 3)
   {
    WritePrivateProfileStringA(NUM_1, "Class", Studata, File_);
   }
   if (i == 4)
   {
    WritePrivateProfileStringA(NUM_1, "Chinese", Studata, File_);
   }
   if (i == 5)
   {
    WritePrivateProfileStringA(NUM_1, "Mathematics", Studata, File_);
   }
   if (i == 6)
   {
    WritePrivateProfileStringA(NUM_1, "English", Studata, File_);
   }
   if (i == 7)
   {
    WritePrivateProfileStringA(NUM_1, "Political", Studata, File_);
   }
   if (i == 8)
   {
    WritePrivateProfileStringA(NUM_1, "History", Studata, File_);
   }
   if (i == 9)
   {
    WritePrivateProfileStringA(NUM_1, "Geography", Studata, File_);
   }
   if (i == 10)
   {
    WritePrivateProfileStringA(NUM_1, "Creatures", Studata, File_);
   }
   if (i == 11)
   {
    WritePrivateProfileStringA(NUM_1, "Physical", Studata, File_);
   }
   if (i == 12)
      {
    WritePrivateProfileStringA(NUM_1, "Chemistry", Studata, File_);
   }
   WritePrivateProfileStringA("Is it the first record?"."F"."1", File_system);
  }
 }
 fout.close();   // Close the file
 delete[]Studata;
 delete[]NUM_1;
 delete[]total_f;
 cout << "Information has been entered." << endl;
 cout<<"Return to upper-level menu (any key)"<<endl;
 int e;
 cin >> e;
}
void DeleteStudent(char * File_system)
{
 char File_[100];  // Read the file address
 int total;    // The total number of people reading records
 int N;     // Get the number of subjects
 int F;     // Get the record
 char CH[10];   // Get the character class type
 int  IN_;    // The number type to get
 int * percase = NULL; // Record delete label
 percase = new int[sizeof(int) * 100];
 int persum = 0;   // Record the number of deletions
 char * SuIT = NULL;
 SuIT = new char[20];
 GetPrivateProfileStringA("FILE"."Address"."Unknown", File_, sizeof(File_), File_system);
 total = GetPrivateProfileIntA("Record number"."total".- 1, File_system);
 N = GetPrivateProfileIntA("SUBGECT"."Total number of subjects".- 1, File_system);
 F = GetPrivateProfileIntA("Is it the first record?"."F".- 1, File_system);
 if (F == - 1)MessageBoxA(NULL."You have not recorded any student information and cannot delete it."."News", MB_OK);
 if (F == 0) MessageBoxA(NULL."You have not recorded any student information and cannot delete it."."News", MB_OK);
 if (F == 1)
 {
  for (int j = 1; j <= total; j++)
  {
   int sum = 0;      // Unqualified subject
   char Delename[50] = "";
   for (int i = 1; i <= N + 3; i++)
   {
    char CH_F[10];// Alphanumeric
    sprintf(SuIT, "%d", j);
    if (i == 1)
    {
    GetPrivateProfileStringA(SuIT, "Name"."Unknown", CH, sizeof(CH), File_);
     strcat(Delename, CH);
     strcat(Delename, "");
    }
    if (i == 2)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Student id".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
    }
    if (i == 3)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Class".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
    }
    if (i == 4)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Chinese".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
     if (IN_ <= 60)
      sum += 1;
    }
    if (i == 5)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Mathematics".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
     if (IN_ <= 60)sum += 1;
    }
    if (i == 6)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "English".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
     if (IN_ <= 60)sum += 1;
    }
    if (i == 7)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Political".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
     if (IN_ <= 60)sum += 1;
    }
    if (i == 8)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "History".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
     if (IN_ <= 60)sum += 1;
    }
    if (i == 9)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Geography".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
     if (IN_ <= 60)sum += 1;
    }
    if (i == 10)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Creatures".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
     if (IN_ <= 60)sum += 1;
    }
    if (i == 11)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Physical".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
     if (IN_ <= 60)sum += 1;
    }
     if (i == 12)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Chemistry".- 1, File_);
     sprintf(CH_F, "%d", IN_);
     strcat(Delename, CH_F);
     strcat(Delename, "");
     if (IN_ <= 60)sum += 1; }}if (sum >= 3) // Print the student's information if more than three subjects are failed
   {
    cout << Delename;
    cout << endl;
    percase[persum] = j;
    persum += 1;// Delete the number of people}}}if (IDYES == MessageBoxA(NULL."Delete \n Press \" yes" "Confirm deletion"."Message (made by Flower Dog)", MB_YESNO))
 {
  for (int j = 1; j <= persum; j++)
  {
   char LS[10];
   sprintf(LS, "%d", percase[j - 1]);
   WritePrivateProfileStringA(LS, NULL.NULL, File_); }}else
 {
  cout << "You have cancelled deletion......";
 }
 delete[]percase;
 delete[]SuIT;
 cout << "Information processed (return to menu with any key)" << endl;
 int e;
 cin >> e;
}
void ChooesStudent(char * File_system)
{
 int Stunumer = 0; // Get the student id
 char File_[100]; // Read the file address
 char CH[10];  // Get the character class type
 int  IN_;   // The number type to get
 char CH_[20];
 int total;   // The total number of people reading records
 int N;    // Get the number of subjects
 char * SuIT = NULL;
 SuIT = new char[20];
 int a = 0;   // If there is no information about the student id, then a is 0
 char CH_1[20];
 GetPrivateProfileStringA("FILE"."Address"."Unknown", File_, sizeof(File_), File_system);
 total = GetPrivateProfileIntA("Record number"."total".- 1, File_system);
 N = GetPrivateProfileIntA("SUBGECT"."Total number of subjects".- 1, File_system);
 cout << "Input student number to modify student information \n";
 cin >> Stunumer;
 for (int j = 1; j <= total; j++)
 {
  sprintf(CH_1, "%d", j);
  a = GetPrivateProfileIntA(CH_1, "Student id".- 1, File_);
  if (Stunumer == a)
  {
   for (int i = 1; i <= N + 3; i++)
   {
    sprintf(SuIT, "%d", j);
    if (i == 1)
    {
     GetPrivateProfileStringA(SuIT, "Name"."error", CH, sizeof(CH), File_);
     cout << "Name:";
     cout << CH << endl;
    }
    if (i == 2)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Student id".- 1, File_);
     cout << "Student number.";
     cout << IN_ << endl;
    }
    if (i == 3)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Class".- 1, File_);
     cout << "Class.";
     cout << IN_ << endl;
    }
    if (i == 4)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Chinese".- 1, File_);
     if (IDYES == MessageBoxA(NULL."Whether to modify language score \n press \" Yes \" Modify Press \" no \" to proceed to the next modification"."News", MB_YESNO))
     {
      cin >> IN_;
      sprintf(CH_, "%d", IN_);
      WritePrivateProfileStringA(SuIT, "Chinese", CH_, File_); }}if (i == 5)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Mathematics".- 1, File_);
     if (IDYES == MessageBoxA(NULL."Whether to modify math score \n press \" yes \" modify press \" no \" to proceed to the next modification"."News", MB_YESNO))
     {
      cin >> IN_;
      sprintf(CH_, "%d", IN_);
      WritePrivateProfileStringA(SuIT, "Mathematics", CH_, File_); }}if (i == 6)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "English".- 1, File_);
     if (IDYES == MessageBoxA(NULL."Whether to modify English score \n press \" Yes \" modify press \" no \" to proceed to the next modification"."News", MB_YESNO))
     {
      cin >> IN_;
      sprintf(CH_, "%d", IN_);
      WritePrivateProfileStringA(SuIT, "English", CH_, File_); }}if (i == 7)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Political".- 1, File_);
     if (IDYES == MessageBoxA(NULL."Whether to modify political score \n press \" Yes \" modify press \" no \" to proceed to the next modification"."News", MB_YESNO))
     {
      cin >> IN_;
      sprintf(CH_, "%d", IN_);
      WritePrivateProfileStringA(SuIT, "Political", CH_, File_); }}if (i == 8)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "History".- 1, File_);
     if (IDYES == MessageBoxA(NULL."Do YOU want to modify your historical score?" press "Yes". "Modify" Press "no" to proceed to the next modification."."News", MB_YESNO))
     {
      cin >> IN_;
      sprintf(CH_, "%d", IN_);
      WritePrivateProfileStringA(SuIT, "History", CH_, File_); }}if (i == 9)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Geography".- 1, File_);
     if (IDYES == MessageBoxA(NULL."Change geography score \n press \" Yes \" Change press \" no \" to go to the next change"."News", MB_YESNO))
     {
      cin >> IN_;
      sprintf(CH_, "%d", IN_);
      WritePrivateProfileStringA(SuIT, "Geography", CH_, File_); }}if (i == 10)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Creatures".- 1, File_);
     if (IDYES == MessageBoxA(NULL."Whether to modify biological grade \n press \" Yes \" Modify press \" no \" to proceed to the next modification"."News", MB_YESNO))
     {
      cin >> IN_;
      sprintf(CH_, "%d", IN_);
      WritePrivateProfileStringA(SuIT, "Creatures", CH_, File_); }}if (i == 11)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Physical".- 1, File_);
     if (IDYES == MessageBoxA(NULL."Do YOU want to modify your physics grade? Press" "Yes" "Modify" press "" No" "to proceed to the next modification"."News", MB_YESNO))
     {
      cin >> IN_;
      sprintf(CH_, "%d", IN_);
      WritePrivateProfileStringA(SuIT, "Physical", CH_, File_); }}if (i == 12)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Chemistry".- 1, File_);
     if (IDYES == MessageBoxA(NULL."Whether to modify chemistry grade \n press \" Yes \" modify press \" no \" to proceed to the next modification"."News", MB_YESNO))
     {
      cin >> IN_;
      sprintf(CH_, "%d", IN_);
      WritePrivateProfileStringA(SuIT, "Chemistry", CH_, File_); } } } ++a; }}delete[]SuIT;
 cout << "Information has been modified (any key returns to menu)" << endl;
 int e;
 cin >> e;
}
void ShowNew(char * File_system)
{
 char File_[100]; // Read the file address
 int total;   // The total number of people reading records
 int N;    // Get the number of subjects
 int F;    // Get the record
 char CH[10];  // Get the character class type
 int  IN_;   // The number type to get
 char * SuIT = NULL;
 SuIT = new char[20];
 GetPrivateProfileStringA("FILE"."Address"."Unknown", File_, sizeof(File_), File_system);
 total = GetPrivateProfileIntA("Record number"."total".- 1, File_system);
 N = GetPrivateProfileIntA("SUBGECT"."Total number of subjects".- 1, File_system);
 F = GetPrivateProfileIntA("Is it the first record?"."F".- 1, File_system);
 if (F == - 1)MessageBoxA(NULL."You didn't record any student information."."News", MB_OK);
 if (F == 0) MessageBoxA(NULL."You didn't record any student information."."News", MB_OK);
 if (F == 1)
 {
  for (int j = 1; j <= total; j++)
  {
   int a = 0;
   for (int i = 1; i <= N + 3; i++)
   {
    sprintf(SuIT, "%d", j);
    if (i == 1)
    {
     GetPrivateProfileStringA(SuIT, "Name"."error", CH, sizeof(CH), File_);
     if (strcmp(CH, "error") != 0)cout << CH << "";
     else ++a;
    }
    if (i == 2)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Student id".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << "";
    }
    if (i == 3)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Class".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << "";
    }
    if (i == 4)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Chinese".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << "";
    }
    if (i == 5)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Mathematics".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << "";
    }
    if (i == 6)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "English".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << "";
    }
    if (i == 7)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Political".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << "";
    }
    if (i == 8)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "History".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << "";
    }
    if (i == 9)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Geography".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << "";
    }
    if (i == 10)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Creatures".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << "";
    }
    if (i == 11)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Physical".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << "";
    }
    if (i == 12)
    {
     IN_ = GetPrivateProfileIntA(SuIT, "Chemistry".- 1, File_);
     if(IN_ ! =- 1)cout << IN_ << ""; }}if (a == 0)cout << endl; }}delete[]SuIT;
 cout << "Information has been viewed (any key to return to menu)" << endl;
 int e;
 cin >> e;
}
void NameSeatch(char * File_system)
{
 char Stunumer[10];  // Get the student's name
 char File_[100]; // Read the file address
 char CH[10];  // Get the character class type
 char CH_[20];
 char CH_1[20];
 int  IN_;   // The number type to get
 int total;   // The total number of people reading records
 int N;    // Get the number of subjects
 char * SuIT = NULL;
 SuIT = new char[20];
 int a = 0;   // If there is no information about the student id, then a is 0
 int b = 0;
 GetPrivateProfileStringA("FILE"."Address"."Unknown", File_, sizeof(File_), File_system);
 total = GetPrivateProfileIntA("Record number"."total".- 1, File_system);
 N = GetPrivateProfileIntA("SUBGECT"."Total number of subjects".- 1, File_system);
 cout << "Enter student name to view student information \n";
 while (1)
 {
  cin >> Stunumer;
  b = 0;
  for (int j = 1; j <= total; j++)
  {
   sprintf(CH_1, "%d", j);
   GetPrivateProfileStringA(CH_1, "Name"."Unknown", CH_, sizeof(CH_), File_);
   if (strcmp(Stunumer, CH_) == 0)
   {
    for (int i = 1; i <= N + 3; i++)
    {
     sprintf(SuIT, "%d", j);
     if (i == 1)
     {
      GetPrivateProfileStringA(SuIT, "Name"."error", CH, sizeof(CH), File_);
      cout << "Name:";
      cout << CH << endl;
     }
     if (i == 2)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Student id".- 1, File_);
      cout << "Student number.";
      cout << IN_ << endl;
     }
     if (i == 3)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Class".- 1, File_);
      cout << "Class.";
      cout << IN_ << endl;
     }
     if (i == 4)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Chinese".- 1, File_);
      cout << "The language.";
      cout << IN_ << endl;
     }
     if (i == 5)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Mathematics".- 1, File_);
      cout << "Math.";
      cout << IN_ << endl;
     }
     if (i == 6)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "English".- 1, File_);
      cout << "English.";
      cout << IN_ << endl;
     }
     if (i == 7)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Political".- 1, File_);
      cout << "Political.";
      cout << IN_ << endl;
     }
     if (i == 8)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "History".- 1, File_);
      cout << "History.";
      cout << IN_ << endl;
     }
     if (i == 9)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Geography".- 1, File_);
      cout << "Geographical.";
      cout << IN_ << endl;
     }
     if (i == 10)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Creatures".- 1, File_);
      cout << "Life.";
      cout << IN_ << endl;
     }
     if (i == 11)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Physical".- 1, File_);
      cout << "Physical.";
      cout << IN_ << endl;
     }
     if (i == 12)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Chemistry".- 1, File_);
      cout << "Chemistry.";
      cout << IN_ << endl;
     }
    }
    b = 1; }}if (b == 0)
  {
   cout << "You entered the wrong name or there is no student." << endl;
   cout << "Do you want to search by class? If yes, press 1. If you want to search by name, press 2. << endl;
   int w;
   cin >> w;
   if (w == 1)
   {
    ClassSeatch(File_system);
   }
   if(w ! =1&& w ! =2)
   {
    cout << "tuichu";
    break; }}}delete[]SuIT;
}
void ClassSeatch(char * File_system) 
{
 int Stunumer = 0; // Get the class of students
 char File_[100]; // Read the file address
 char CH[10];  // Get the character class type
 char CH_1[20];
 int  IN_;   // The number type to get
 int total;   // The total number of people reading records
 int N=0;            // Get the number of subjects
 char * SuIT = NULL;
 SuIT = new char[20];
 int a = 0;   // If there is no information about the student id, then a is 0
 int b = 0;   // Check if it is found
 GetPrivateProfileStringA("FILE"."Address"."Unknown", File_, sizeof(File_), File_system);
 total = GetPrivateProfileIntA("Record number"."total".- 1, File_system);
 N = GetPrivateProfileIntA("SUBGECT"."Total number of subjects".- 1, File_system);
 cout << "Enter student class to view student information \n";
 while (1)
 {
  cin >> Stunumer; // Get the class
  for (int j = 1; j <= total; j++)
  {
   sprintf(CH_1, "%d", j);
   a = GetPrivateProfileIntA(CH_1, "Class".- 1, File_);
   if (Stunumer == a)
   {
    for (int i = 1; i <= N + 3; i++)
    {
     sprintf(SuIT, "%d", j);
     if (i == 1)
     {
      GetPrivateProfileStringA(SuIT, "Name"."error", CH, sizeof(CH), File_);
      cout << "Name:";
      cout << CH << endl;
     }
     if (i == 2)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Student id".- 1, File_);
      cout << "Student number.";
      cout << IN_ << endl;
     }
     if (i == 3)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Class".- 1, File_);
      cout << "Class.";
      cout << IN_ << endl;
     }
     if (i == 4)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Chinese".- 1, File_);
      cout << "The language.";
      cout << IN_ << endl;
     }
     if (i == 5)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Mathematics".- 1, File_);
      cout << "Math.";
      cout << IN_ << endl;
     }
     if (i == 6)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "English".- 1, File_);
      cout << "English.";
      cout << IN_ << endl;
     }
     if (i == 7)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Political".- 1, File_);
      cout << "Political.";
      cout << IN_ << endl;
     }
     if (i == 8)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "History".- 1, File_);
      cout << "History.";
      cout << IN_ << endl;
     }
     if (i == 9)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Geography".- 1, File_);
      cout << "Geographical.";
      cout << IN_ << endl;
     }
     if (i == 10)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Creatures".- 1, File_);
      cout << "Life.";
      cout << IN_ << endl;
     }
     if (i == 11)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Physical".- 1, File_);
      cout << "Physical.";
      cout << IN_ << endl;
     }
     if (i == 12)
     {
      IN_ = GetPrivateProfileIntA(SuIT, "Chemistry".- 1, File_);
      cout << "Chemistry.";
      cout << IN_ << endl;
     }
    }
    b = 1; }}if (b==0)
  {
   cout << "You entered the wrong class or no one is in that class." << endl;
   cout << "Do you want to search by name? If yes, press 1. If you want to search by class, press 2. << endl;
   int w;
   cin >> w;
   if (w == 1)
   {
    NameSeatch(File_system);
   }
   if(w ! =1&& w ! =2)
   {
    cout << "tuichu";
    break; }}}delete[]SuIT;
}
int ListShow_1(a)
{
 cout << "╔ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╗ \ n";
 cout << "                     ║══  ①信息维护  ══  ②信息检索  ══║\n";
 cout << "║ ║ \ n";
 cout << "║ ═ ═ (3) information statistics ═ ═ (4) exit system ═ ═ ║ \ n";
 cout << "╚ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╝ \ n";
 MessageBoxA(NULL."Please select a feature"."Message (made by Flower Dog)", MB_OK);
 int num_1;
 cin >> num_1; // The user selects
 system("cls");
 return num_1;
}
int ListShow_2(a)
{
 cout << "╔ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╗ \ n";
 cout << "║ ═ ═ (1) to establish a student achievement table ═ ═ (2) add student record ═ ═ ║ \ n";
 cout << "║ ║ \ n";
 cout << "║ 反 错 误 误 反 错 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 ║\n";
 cout << "║ ║ \ n";
 cout << "║ 错 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 误 ║\n";
 cout << "╚ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╝ \ n";
 MessageBoxA(NULL."Please select the function again (do not select 1 if it is not your first use)"."Message (made by Flower Dog)", MB_OK);
 int num_2;
 cin >> num_2; // The user selects
 p = &num_2;   
 system("cls");
 return num_2;
}
int ListShow_3(a)
{
 cout << "╔ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╗ \ n";
 cout << "║ ═ ═ (1) according to the name lookup ═ ═ (2) according to class lookup ═ ═ ║ \ n";
 cout << "║ ║ \ n";
 cout << "║═ 错 误 误 ③ Return to upper menu ║\n";
 cout << "╚ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╝ \ n";
 MessageBoxA(NULL."Please select the feature again"."Message (made by Flower Dog)", MB_OK);
 int num_2;
 cin >> num_2; // The user selects
 p = &num_2;
 system("cls");
 return num_2;
}
int ListShow_4(a)
{
 cout << "╔ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╗ \ n";
 cout << "║ ═ ═ (1) performance statistics ═ ═ (2) return to the higher level menu ═ ═ ║ \ n";
 cout << "╚ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ╝ \ n";
 MessageBoxA(NULL."Please select the feature again"."Message (made by Flower Dog)", MB_OK);
 int num_2;
 cin >> num_2; // The user selects
 p = &num_2;
 system("cls");
 return num_2;
}
void ShowP(a)
{
 SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
  FOREGROUND_INTENSITY | FOREGROUND_RED);/ / red
 cout << "School student Information Management System (huagou QQ/VX:2506897252 for study only)\n"<< endl;
 SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
  FOREGROUND_INTENSITY | FOREGROUND_BLUE);/ / blue
 cout << "Main functions:" << endl;
 cout << "1. Establish password login (module A)" << endl;
 cout << "Verify administrator's identity with password form (can enter three times), password is correct can enter, otherwise the program ends." << endl;
 cout << "2. Establish student Achievement Tables (Module B)" << endl;
 cout << "Create new student grade files;" << endl;
 cout << "Create several student records, including name, student number, class, course, grade, including adding student records." << endl;
 cout << "3. Add student Records (Module C)" << endl;
 cout << "Add a new record to an existing student score file." << endl;
 cout << "4. Delete student Records (Module D)" << endl;
 cout << "Delete from the student record file the records of students who failed three courses;" << endl;
 cout << "Before deleting, show the names and grades of students who meet the conditions for deleting, and delete them after confirmation." << endl;
 cout << "5. Modify student information (Module E)" << endl;
 cout << "Enter the student ID and find the student record in the student record file." << endl;
 cout << "Display the student's records one by one on the screen;" << endl;
 cout << If "Y" is displayed, enter the modified data. << endl;
 cout << "Delete the original file record and save the new record;" << endl;
 cout << "6. Search by name and class (module F)" << endl;
 cout << "Enter your name to display information." << endl;
 cout << "7. Information Statistics (Module G)" << endl;
 cout << "At the same time according to the class and course statistics of each course, each class of the average score, the highest score, the lowest score; << endl;
 cout << "On the screen first show each course, corresponding to the statistics of each class." << endl;
 cout << "8. Exit the information management system and return to the operating system. H (module)" << endl;
}
void NumberSum(char * File_system)
{}Copy the code

Feel free to point out any mistakes and look forward to my next article. “> < p style =” max-width: 100%; clear: both; min-height: 1em;

Every sentence: hope, happiness will come to you; Ideal, opportunity will cover you. = =