I am using a map inside a map and want to access a specific member in the second map.
std::map<int, std::map<DWORD,IDLL::CClass*>*> MyMap
I am using a map inside a map and want to access a specific member in the second map.
std::map<int, std::map<DWORD,IDLL::CClass*>*> MyMap
You can use
std::map::find
in two steps: first to find the value associated with the key in the outer map, and then repeat for the inner map.The following compilable code seems to work with VS2010 SP1 (VC10):
If you aren't sure the keys exist:
If you are sure the keys exist, you could also try:
Try