-1
#include <iostream>
#include<Windows.h>
#include<string>
using namespace std;
using LINE = char[20];
enum DAY_OF_WEEK { mon, tue, wed, thu, fri, sat, sun };
struct TIME
{
    int hours[23], minutes[59];
};
struct SEMINAR
{
    LINE subj, prepod;
    DAY_OF_WEEK day;
    struct clock
    {
        TIME begin, fin;
    };
    using GROUP_NUMBER = int[300];
};
int auditorium;

what should I add? I don't really understand how I should check that there should be classes on Saturday

  • 1
    A `TIME` really has an array of size 23 for hours and an array of size 59 for minutes? Do you set the hour/minute to 1 where it actually starts and the rest to 0? What if the class starts at 23:59? The day has 24 hours, not 23 and the hour has 60 minutes and not 59. `int hours[23]` does not specify a number between 0 and 23 if that is what you mend. – Goswin von Brederlow May 17 '22 at 17:25
  • 1
    I suspect more time spent with [a good textbook](https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list) will be more helpful than an answer at this point. See above comment for my reasoning. – user4581301 May 17 '22 at 17:28
  • Prefer to use `std::string` instead of character arrays. Arrays can overflow. – Thomas Matthews May 17 '22 at 17:30
  • Where is the schedule of school classes, how is it formatted ? Where are functions ? What is the purpose of these structures ? – 440 May 17 '22 at 17:45
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community May 18 '22 at 02:24

0 Answers0