Advertisement
Usow_Maxim

Lab_8.10

Feb 9th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.41 KB | None | 0 0
  1. /////////////
  2. //main.cpp
  3. ////////////
  4.  
  5. #include "module.h"
  6.  
  7. int main()
  8. {
  9.     SetConsoleCP(1251);
  10.     SetConsoleOutputCP(1251);
  11.  
  12.     int Size = 0;
  13.     Music* musics = NULL;
  14.  
  15.     bool firstRun = true;
  16.     bool RUN = true;
  17.     while(RUN){
  18.         system("cls");
  19.         if(firstRun)
  20.         {
  21.             printf("Добро пожаловать в меню, Денис Владимирович!\nВыбирайте!\n\n");
  22.             firstRun = false;
  23.         }
  24.         printf("***********************\n");
  25.         printf("[Меню]\n1.Загрузить список\n2.Сохранить список\n3.Вывод списка\n4.Редактирование списка\n5.Выход\n***********************\nВыбор: ");
  26.         switch(Write_int()){
  27.             case 1:
  28.             {
  29.                 system("cls");
  30.                 musics = FileRead(Size);
  31.             }
  32.             case 2:
  33.             {
  34.                 system("cls");
  35.                 FileWrite(musics, Size);
  36.                 break;
  37.             }
  38.             case 3:
  39.             {
  40.                 OutputMusic(musics, Size);
  41.                 break;
  42.             }
  43.             case 4:
  44.             {
  45.                 musics = InputMusic(musics, Size);
  46.                 break;
  47.             }
  48.             case 5:
  49.                 RUN = false;
  50.                 break;
  51.         }
  52.     }
  53.  
  54.     delete[] musics;
  55.     return 0;
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement