Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int read_bin_file(string filename, time_task** beg, time_task** end) {
- total_el = 0;
- ifstream fin;
- fin.open(filename);
- if (!fin) {
- MessageBox(0, L"Нет файла!", L"Ошибка", MB_ICONERROR | MB_SETFOREGROUND);
- return 1;
- }
- fin.seekg(ios::beg);
- time_task* t = new time_task;
- t->next = NULL;
- t->prev = NULL;
- *beg = 0;
- while ( fin.read((char*)& t->d, sizeof(t->d)) ) {
- if (*beg) {
- cout << t->d.all_time << endl;
- system("pause");
- *end = input(*end, *t);
- } else {
- *beg = input(*t);
- *end = *beg;
- }
- total_el++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement