ID 5787576
Пользователь Росляков Владимир Олегович
Время 22:03<< 16.11.2021 22:03 (27 д. 20:03) 22:04>>
Обработка 22:03 ... 22:03 (2,08 сек.)
Файл 5787576.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: In member function 'void Gamedbase::Insert(ObjectId, std::__cxx11::string, size_t, size_t)':
game_database.h:27:41: error: no matching function for call to 'std::vector<GameObject>::emplace_back(<brace-enclosed initializer list>)'
       db.emplace_back({ id, name, x, y });
                                         ^
In file included from /usr/include/c++/7/vector:69:0,
                 from main.cpp:3:
/usr/include/c++/7/bits/vector.tcc:95:7: note: candidate: void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {}; _Tp = GameObject; _Alloc = std::allocator<GameObject>]
       vector<_Tp, _Alloc>::
       ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/7/bits/vector.tcc:95:7: note:   candidate expects 0 arguments, 1 provided
main.cpp: In function 'int main()':
main.cpp:30:5: error: 'GameDatabase' was not declared in this scope
     GameDatabase db;
     ^~~~~~~~~~~~
main.cpp:30:5: note: suggested alternative: 'Gamedbase'
     GameDatabase db;
     ^~~~~~~~~~~~
     Gamedbase
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())
                          ^~
0.028s 0.008s 9