Задачи на типы в C++. Часть 3
Дан следующий код:
auto xxx = std::map<std::string, int>{
{"first", 1}, {"second", 2}, {"third", 3}
};
Явно укажите тип переменной.
Дан следующий код:
auto xxx = std::map<int, std::string>{
{1, "apple"}, {2, "banana"}
};
Явно укажите тип переменной.
Дан следующий код:
auto xxx = std::map<int, int>{
{1, 100}, {2, 200}, {3, 300}
};
Явно укажите тип переменной.
Дан следующий код:
auto xxx = std::map<std::string, bool>{
{"a", true}, {"b", false}, {"c", true}
};
Явно укажите тип переменной.
Дан следующий код:
auto xxx = std::map<char, double>{
{'x', 1.5}, {'y', 2.5}, {'z', 3.5}
};
Явно укажите тип переменной.
Дан следующий код:
auto xxx = std::map<long, std::string>{
{1L, "one"}, {2L, "two"}, {3L, "three"}
};
Явно укажите тип переменной.
Дан следующий код:
auto xxx = std::map<std::string, float>{
{"first", 1.0f}, {"second", 2.0f}, {"third", 3.0f}
};
Явно укажите тип переменной.
Дан следующий код:
auto xxx = std::map<bool, std::string>{
{true, "yes"}, {false, "no"}
};
Явно укажите тип переменной.