i have 2 maps like below:
they are actually pretty same maps, just key and value are swaped.
i want to find out whether or not a value (which is string) is in the mapB like this
Thanks in advance
Code:
typedef std::map<std::string, ObjA> MapA; typedef std::map<ObjA, std::string> MapB; MapA mapa; MapB mapb;
i want to find out whether or not a value (which is string) is in the mapB like this
Code:
ObjA function (const char * value){
for (MapB::const_iterator it = _mapb.begin(); it != _mapb.end(); ++it){
// how do i fill here..
// mapb is something like this:
// mapb <ObjA, value>
// like how to check if it == value and return ObjA
}
}
Comment