There could be gundreds of way to do that. Here is one:
template<class T> void dumpVector( const std::vector<T>& vect )
{
for ( std::vector<T>::const_iterator iter = vect.begin();
iter != vect.end();
++iter )
{
std::cout << " " << *iter;
}
}
for ( std::map<vector<double>,vector<int>>::const_iterator mapIter = path.begin();
mapIter != path.end();
++mapIter )
{
std::cout << "Map key:";
dumpVector<double>( mapIter->first );
std::cout << " has value:";
dumpVector<int>( mapIter->second );
std::cout << std:endl;
}
Hope this helps.
solved Display a map of two vectors