I know this is some basic stuff but I can't manage to iterate over an unordered_map
of std::vectors
and print the content of each vector. My unordered_map
looks like this:
std::unordered_map<std::string, std::vector<int> > _dict;
And for now I can just print the first
attribute of the map:
for (auto &it : _dict)
{
std::cout << it.first <<std::endl;
}
But it gives me an error when trying to print the second
attribute. Does anyone know how I can achieve that ? Thanks!