C++: Accessing std::map keys and values
- by Jay
How do you access an std::vector of the keys or values of an std::map?
Thanks.
Edit: I would like to access the actual elements, not just copies of their contents. essentially I want a reference, not a copy.
This is essentially what I am wanting to do:
std::map<std::string, GLuint> textures_map;
// fill map
glGenTextures( textures_map.size(), &textures_map.access_values_somehow[0] );