YT_o4ka

Untitled

May 13th, 2022
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. class read : public virtual f{
  2. public:
  3. void f_read() {
  4. struct student chel;
  5. fopen_s(&ou, "flilk", "ab+");
  6. fread(&chel, sizeof(chel), 1, ou);
  7. while (!feof(ou)) {
  8. cout << " ФИО студента " << chel.im << " " << chel.fam << " " << chel.ot << endl;
  9. cout << " Дата рождения студента " << chel.b_day << " " << chel.b_month << " " << chel.b_year << endl;
  10. cout << " Кафедра, номер группы и зачётки " << chel.kaf << " " << chel.group << " " << chel.zachetka << endl;
  11. cout << " Количество ссесий " << chel.sess_co << endl;
  12. for (int i = 0; i < chel.sess_co; i++) {
  13. cout << " Количество предметов " << i +1 << " сессии равно " << chel.s[i].predm_co << endl;
  14. for (int j = 0; j < chel.s[i].predm_co; j++) {
  15. cout << " Название предмета и оценка " << chel.s[i].p[j].name << " " << chel.s[i].p[j].mark << endl;
  16. }
  17. }
  18. cout << "\n\n";
  19. fread(&chel, sizeof(chel), 1, ou);
  20. }
  21. fclose(ou);
  22. }
  23. };
Advertisement
Add Comment
Please, Sign In to add comment