Hey Guys,
I'm pretty new to containers, but need to use them for a project I'm doing.
I've figured out that I can use a map iterator to iterate through values stored in the map displaying the key, followed by the second value.
In my case, the key is anint
and the second value is a nested vector of the form vector<vector<double> >
.
My question is how would I go about using a the map iterator to display the contents of the second value? Would I need a for loop somewhere?
Here's the relevant code snippet.
map<int, vector<vector<double> > >::iterator miter;
for(miter = triangleMap.begin(); miter != triangleMap.end(); miter++)
{
cout<<"\nSet "<<(*miter).first;//<<", holding "<<(*miter).second;
}
//The part that is commented out above is what does not work.
Thanks in advance