ID 5961691
Пользователь Пигидин Игорь
Время 22:35<< 08.01.2022 22:35 (0:17)
Обработка 22:35 ... 10:16 (42090.37 сек.)
Файл 5961691.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:11:42: error: expected ')' before '*' token
     explicit BufferedReader(PackageStream* stream) : stream(stream),
                                          ^
date.h:55:5: error: 'PackageStream' does not name a type
     PackageStream* stream;
     ^~~~~~~~~~~~~
date.h: In member function 'int32_t BufferedReader::Read(char*, int32_t)':
date.h:33:27: error: 'stream' was not declared in this scope
         int32_t new_len = stream->ReadPackage(buffer);
                           ^~~~~~
date.h:33:27: note: suggested alternative: 'strcat'
         int32_t new_len = stream->ReadPackage(buffer);
                           ^~~~~~
                           strcat
main.cpp: In function 'int main()':
main.cpp:20:9: error: 'Date' was not declared in this scope
         Date dt(1997, 1, 19);
         ^~~~
In file included from /usr/include/c++/7/cassert:44:0,
                 from main.cpp:15:
main.cpp:21:17: error: 'dt' was not declared in this scope
         assert(!dt.IsLeap());
                 ^
main.cpp:25:9: error: 'Date' was not declared in this scope
         Date dt(100, 10, 1);
         ^~~~
In file included from /usr/include/c++/7/cassert:44:0,
                 from main.cpp:15:
main.cpp:26:17: error: 'dt' was not declared in this scope
         assert(!dt.IsLeap());
                 ^
main.cpp:30:9: error: 'Date' was not declared in this scope
         Date dt(1, 1, 1);
         ^~~~
In file included from /usr/include/c++/7/cassert:44:0,
                 from main.cpp:15:
main.cpp:31:17: error: 'dt' was not declared in this scope
         assert(!dt.IsLeap());
                 ^
main.cpp:35:9: error: 'Date' was not declared in this scope
         Date dt(2000, 10, 22);
         ^~~~
In file included from /usr/include/c++/7/cassert:44:0,
                 from main.cpp:15:
main.cpp:36:16: error: 'dt' was not declared in this scope
         assert(dt.IsLeap());
                ^
main.cpp:40:9: error: 'Date' was not declared in this scope
         Date dt(400, 1, 9);
         ^~~~
In file included from /usr/include/c++/7/cassert:44:0,
                 from main.cpp:15:
main.cpp:41:16: error: 'dt' was not declared in this scope
         assert(dt.IsLeap());
                ^
main.cpp:45:9: error: 'Date' was not declared in this scope
         Date dt(1996, 7, 8);
         ^~~~
In file included from /usr/include/c++/7/cassert:44:0,
                 from main.cpp:15:
main.cpp:46:16: error: 'dt' was not declared in this scope
         assert(dt.IsLeap());
                ^
main.cpp:50:9: error: 'Date' was not declared in this scope
         Date dt(2000, 1, 1);
         ^~~~
In file included from /usr/include/c++/7/cassert:44:0,
                 from main.cpp:15:
main.cpp:51:16: error: 'dt' was not declared in this scope
         assert(dt.DaysLater(0).ToString() == "01.01.2000");
                ^
main.cpp:59:9: error: 'Date' was not declared in this scope
         Date dt(2001, 1, 1);
         ^~~~
In file included from /usr/include/c++/7/cassert:44:0,
                 from main.cpp:15:
main.cpp:60:16: error: 'dt' was not declared in this scope
         assert(dt.DaysLater(0).ToString() == "01.01.2001");
                ^
main.cpp:68:9: error: 'Date' was not declared in this scope
         Date dt(2000, 1, 1);
         ^~~~
In file included from /usr/include/c++/7/cassert:44:0,
                 from main.cpp:15:
main.cpp:69:16: error: 'dt' was not declared in this scope
         assert(dt.DaysLeft(Date{2000, 1, 1}) == 0);
                ^
main.cpp:69:32: error: expected ')' before '{' token
         assert(dt.DaysLeft(Date{2000, 1, 1}) == 0);
                                ^
main.cpp:70:32: error: expected ')' before '{' token
         assert(dt.DaysLeft(Date{2000, 1, 11}) == 10);
                                ^
main.cpp:71:32: error: expected ')' before '{' token
         assert(dt.DaysLeft(Date{2000, 1, 31}) == 30);
                                ^
main.cpp:72:32: error: expected ')' before '{' token
         assert(dt.DaysLeft(Date{2000, 2, 1}) == 31);
                                ^
main.cpp:73:32: error: expected ')' before '{' token
         assert(dt.DaysLeft(Date{2000, 3, 1}) == 60);
                                ^
main.cpp:74:32: error: expected ')' before '{' token
         assert(dt.DaysLeft(Date{2001, 1, 1}) == 366);
                                ^
main.cpp:77:9: error: 'Date' was not declared in this scope
         Date dt(2001, 1, 1);
         ^~~~
In file included from /usr/include/c++/7/cassert:44:0,
                 from main.cpp:15:
main.cpp:78:16: error: 'dt' was not declared in this scope
         assert(dt.DaysLeft(Date{2001, 1, 1}) == 0);
                ^
main.cpp:78:32: error: expected ')' before '{' token
         assert(dt.DaysLeft(Date{2001, 1, 1}) == 0);
                                ^
main.cpp:79:32: error: expected ')' before '{' token
         assert(dt.DaysLeft(Date{2001, 1, 11}) == 10);
                                ^
main.cpp:80:32: error: expected ')' before '{' token
         assert(dt.DaysLeft(Date{2001, 1, 31}) == 30);
                                ^
main.cpp:81:32: error: expected ')' before '{' token
         assert(dt.DaysLeft(Date{2001, 2, 1}) == 31);
                                ^
main.cpp:82:32: error: expected ')' before '{' token
         assert(dt.DaysLeft(Date{2001, 3, 1}) == 59);
                                ^
main.cpp:83:32: error: expected ')' before '{' token
         assert(dt.DaysLeft(Date{2002, 1, 1}) == 365);
                                ^
[печатать | |
]
(1 449 b)
0.057s 0.009s 10