dimanche 27 juin 2021

How do I find out the type of this map in a range based for loop?

map <int, map <int, double> > adj_list_M;

I want to run a range based for loop, iterating through this map, and using auto is risky. So I want to know the type I can use for getting the references of the elements.

Also please verify whether this is correct for doing that :

for( auto& ele : adj_list_M )

Thank you in advance!

Aucun commentaire:

Enregistrer un commentaire