Код: Выделить всё
std::unordered_map s_list;Класс2 имеет конструктор копирования формы:
Код: Выделить всё
class2::class2(const class2& obj)
{
x = obj.x;
y = obj.y;
}
Код: Выделить всё
class2::class2(std::string x1, double y1)
{
x = x1;
y = y1;
}
Код: Выделить всё
class2 s_obj(x1, y1);
s_list[x1] = s_obj;
Код: Выделить всё
error: no matching function for call to ‘class2::class2()’
second(std::forward(std::get(__tuple2))...)
^
Подробнее здесь: https://stackoverflow.com/questions/491 ... rdered-map
Мобильная версия