Advertisement
MARSHAL327

Untitled

Dec 11th, 2019
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. int read_file(string filename, time_task * *beg, time_task * *end) {
  2.     ifstream fin;
  3.     fin.open(filename);
  4.  
  5.     if (!fin) {
  6.         MessageBox(0, L"Нет файла!", L"Ошибка", MB_ICONERROR | MB_SETFOREGROUND);
  7.         return 1;
  8.     }
  9.  
  10.     time_task t;
  11.     *beg = 0;
  12.     while (getline(fin, t.d.cipher)) {
  13.         getline(fin, t.d.department_code);
  14.         getline(fin, t.d.fio);
  15.         getline(fin, t.d.all_time);
  16.         getline(fin, t.d.time_cpu);
  17.  
  18.         input(*beg, *end, t);
  19.     }
  20.  
  21.     fin.close();
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement