ID 5482285
Пользователь Морозов Денис Витальевич
Время 23:07<< 13.10.2021 23:09 (28 д. 13:42) 23:09>>
Обработка 23:09 ... 23:09 (2,95 сек.)
Файл 5482285.cpp (CLang++ 5.0.0 + Address Sanitizer)
Турнир 2 курс. Программирование на C++. Турнир 1, осень 2021
Задача E: Date
Набор тестов
Ограничения Время: 1с Память: 512Мб
Состояние  [?]
CE Ошибка компиляции
код | результаты
In file included from main.cpp:16:0:
date.h: In constructor 'Date::Date(int, int, int)':
date.h:6:15: error: 'class Date' has no member named 'year'
         this->year = year;
               ^~~~
date.h:7:15: error: 'class Date' has no member named 'month'
         this->month = month;
               ^~~~~
date.h:8:15: error: 'class Date' has no member named 'day'
         this->day = day;
               ^~~
date.h: In member function 'bool Date::IsLeap() const':
date.h:12:19: error: 'const class Date' has no member named 'year'
         if (this->year % 4 == 0) {
                   ^~~~
date.h:13:23: error: 'const class Date' has no member named 'year'
             if (this->year % 100 == 0) {
                       ^~~~
date.h:14:27: error: 'const class Date' has no member named 'year'
                 if (this->year % 400 == 0) {
                           ^~~~
date.h: In member function 'std::__cxx11::string Date::ToString()':
date.h:28:36: error: 'class Date' has no member named 'day'
         std::string output = this->day + "." + this->month + "." + this->year;
                                    ^~~
date.h:28:54: error: 'class Date' has no member named 'month'
         std::string output = this->day + "." + this->month + "." + this->year;
                                                      ^~~~~
date.h:28:74: error: 'class Date' has no member named 'year'
         std::string output = this->day + "." + this->month + "." + this->year;
                                                                          ^~~~
date.h: In member function 'Date Date::DaysLater(int)':
date.h:34:30: error: 'class Date' has no member named 'year'
         int year_out = this->year;
                              ^~~~
date.h:35:31: error: 'class Date' has no member named 'month'
         int month_out = this->month;
                               ^~~~~
date.h:36:29: error: 'class Date' has no member named 'day'
         int day_out = this->day;
                             ^~~
date.h: In member function 'int Date::DaysLeft(const Date&)':
date.h:91:31: error: 'class Date' has no member named 'year'
         abs_now = 365 * this->year + this->year/4 - this->year/100 +
                               ^~~~
date.h:91:44: error: 'class Date' has no member named 'year'
         abs_now = 365 * this->year + this->year/4 - this->year/100 +
                                            ^~~~
date.h:91:59: error: 'class Date' has no member named 'year'
         abs_now = 365 * this->year + this->year/4 - this->year/100 +
                                                           ^~~~
date.h:92:25: error: 'class Date' has no member named 'year'
                   this->year/400 + (153*this->month - 457)/5 + this->day - 306;
                         ^~~~
date.h:92:47: error: 'class Date' has no member named 'month'
                   this->year/400 + (153*this->month - 457)/5 + this->day - 306;
                                               ^~~~~
date.h:92:70: error: 'class Date' has no member named 'day'
                   this->year/400 + (153*this->month - 457)/5 + this->day - 306;
                                                                      ^~~
date.h:93:31: error: 'const class Date' has no member named 'year'
         abs_then = 365 * date.year + date.year/4 - date.year/100 + date.year/400
                               ^~~~
date.h:93:43: error: 'const class Date' has no member named 'year'
         abs_then = 365 * date.year + date.year/4 - date.year/100 + date.year/400
                                           ^~~~
date.h:93:57: error: 'const class Date' has no member named 'year'
         abs_then = 365 * date.year + date.year/4 - date.year/100 + date.year/400
                                                         ^~~~
date.h:93:73: error: 'const class Date' has no member named 'year'
         abs_then = 365 * date.year + date.year/4 - date.year/100 + date.year/400
                                                                         ^~~~
date.h:94:29: error: 'const class Date' has no member named 'month'
                 + (153*date.month - 457)/5 + date.day - 306;
                             ^~~~~
date.h:94:51: error: 'const class Date' has no member named 'day'
                 + (153*date.month - 457)/5 + date.day - 306;
                                                   ^~~
date.h: In member function 'bool Date::IsLeap() const':
date.h:25:5: error: control reaches end of non-void function [-Werror=return-type]
     }
     ^
cc1plus: all warnings being treated as errors
0.038s 0.009s 9