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())
^~
|