Advertisement
Guest User

Untitled

a guest
Apr 6th, 2020
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.70 KB | None | 0 0
  1. void write_file() {
  2.     ofstream File("database.txt");
  3.         for (int current_size = 0; current_size < max; current_size++) {
  4.         File << list[current_size].number << " | " << list[current_size].B << " | " << list[current_size].day << " | " << list[current_size].hour_a << ":" << list[current_size].minute_a << " | ";
  5.         File<< list[current_size].hour_b <<':'<< list[current_size].minute_b << " | "<<endl;
  6.     }
  7.     cout << "Запись завершена...";
  8.     File.close();
  9.     cout << "Что дальше?" << endl;
  10.     main();
  11. }
  12. void read_file() {
  13.     ifstream File("database.txt");
  14.     string a;
  15.     for (int i = 0; i < max; i++) {
  16.         getline(File, a);
  17.         cout << a<<endl;
  18.     }
  19.     cout << "Что дальше?" << endl;
  20.     main();
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement