ID 5476569
Пользователь Матвеев Ян Альбертович
Время 19:31<< 12.10.2021 19:36 (27 д. 10:10) 19:38>>
Обработка 19:36 ... 19:36 (2,26 сек.)
Файл 5476569.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 member function 'std::__cxx11::string Date::Removeint(int) const':
date.h:28:49: error: invalid use of const_cast with type 'char', which is not a pointer, reference, nor a pointer-to-data-member type
     newString = const_cast<char>(value % 10 + 48) + newString;
                                                 ^
date.h: In constructor 'Date::Date(int, int, int)':
date.h:5:17: error: 'Date::year' will be initialized after [-Werror=reorder]
 int day, month, year;
                 ^~~~
date.h:5:10: error:   'int Date::month' [-Werror=reorder]
 int day, month, year;
          ^~~~~
date.h:51:1: error:   when initialized here [-Werror=reorder]
 Date(int year, int month, int day): year(year), month(month), day(day) {}
 ^~~~
date.h:5:10: error: 'Date::month' will be initialized after [-Werror=reorder]
 int day, month, year;
          ^~~~~
date.h:5:5: error:   'int Date::day' [-Werror=reorder]
 int day, month, year;
     ^~~
date.h:51:1: error:   when initialized here [-Werror=reorder]
 Date(int year, int month, int day): year(year), month(month), day(day) {}
 ^~~~
cc1plus: all warnings being treated as errors
[печатать | |
]
(2 207 b)
0.051s 0.008s 10