#include <iostream>
#include <map>
#include <string>
#include <vector>
std::ostream & operator <<(std::ostream &os,
const std::map<std::string, std::vector<int>> &m)
{
for (const auto &p : m)
{
os << p.first << ": ";
for (int x : p.second) os << x << ' ';
os << std::endl;
}
return os;
}
int main()
{
std::map<std::string, std::vector<int>> m =
{
{ "A", { 1, 2, 3, 4, 5 } },
{ "Z", { 5, 4, 3, 2, 1 } }
};
std::cout << m << std::endl;
}
Coś takiego?