If I have a map of vectors, map
Wouldn't: myMap[ key ].size() do it? I don't see where "second" in your question comes from. The vector is the result of myMap[ key ], so I would think that myMap[ key ][ i ] would refer to an element of the vector.
ooookay, that makes more sense. Okay, then. So, if I am iterating through my map like so: for(auto it = myMap.begin(); it != myMap.end(); ++it) and then I want to check the size of the vector where the iterator is currently pointing. would that be it -> second.size();?
You can always write a little test program on the side to check these things out. I thought you were going more for: for( int i = 0; i < myMap[ key ].size(); i++ ) std::cout << myMap[ key ][ i ] << std::endl;
yeah, I'll have to test a couple different things out ^_^; Thanks for helping me! (even though my question was kinda silly...)
Join our real-time social learning platform and learn together with your friends!