ID 5945229
Пользователь Михайлов Денис Сергеевич
Время 31.12.2021 18:32 (2:27) 18:33>>
Обработка 18:32 ... 18:32 (4,36 сек.)
Файл 5945229.cpp (CLang++ 5.0.0 + Address Sanitizer)
Турнир 2 курс. Программирование на C++. Турнир 2, осень 2021
Задача E: GameDatabase
Набор тестов
Ограничения Время: 1с Память: 4000Мб
Состояние  [?]
CE Ошибка компиляции
код | результаты
In file included from main.cpp:18:0:
game_database.h:7:3: error: 'PageAllocator' does not name a type; did you mean 'FixedAllocator'?
   PageAllocator page_allocator_;
   ^~~~~~~~~~~~~
   FixedAllocator
game_database.h:43:9: error: 'PageAllocator' does not name a type; did you mean 'FixedAllocator'?
   const PageAllocator &InnerAllocator() const noexcept {
         ^~~~~~~~~~~~~
         FixedAllocator
game_database.h: In constructor 'FixedAllocator<Tp>::FixedAllocator(uint64_t)':
game_database.h:21:9: error: class 'FixedAllocator<Tp>' does not have any field named 'page_allocator_'
       : page_allocator_(page_size_c) {
         ^~~~~~~~~~~~~~~
game_database.h: In member function 'Tp* FixedAllocator<Tp>::Allocate()':
game_database.h:32:48: error: 'page_allocator_' was not declared in this scope
     free_memory.emplace_back(static_cast<Tp *>(page_allocator_.Allocate()), 1);
                                                ^~~~~~~~~~~~~~~
game_database.h:32:48: note: suggested alternative: 'FixedAllocator'
     free_memory.emplace_back(static_cast<Tp *>(page_allocator_.Allocate()), 1);
                                                ^~~~~~~~~~~~~~~
                                                FixedAllocator
main.cpp: In function 'int main()':
main.cpp:30:5: error: 'GameDatabase' was not declared in this scope
     GameDatabase db;
     ^~~~~~~~~~~~
main.cpp:41:13: error: 'db' was not declared in this scope
             db.Remove(id);
             ^~
main.cpp:46:9: error: 'db' was not declared in this scope
         db.Insert(id, std::move(name), x, y);
         ^~
main.cpp:51:34: error: 'db' was not declared in this scope
             for (const auto& e : db.DataByPosition(i, j))
                                  ^~
main.cpp:55:34: error: 'db' was not declared in this scope
             for (const auto& e : db.DataByName(string() + i + j))
                                  ^~
main.cpp:57:26: error: 'db' was not declared in this scope
     for (const auto& e : db.Data())
                          ^~
[печатать | |
]
(1 102 b)
0.153s 0.015s 10