-
std::map find
Hello,
The following map
map<string, string> CCF::m_mPDN2GxSessionId;
It got populated with
p CCF::m_mPDN2GxSessionId
$6 = std::map with 1 elements = {
["(4) 0a 03 01 04"] = "192.168.29.40.900;1"
the key referes to ip address 10.3.1.4
Now I have somewhere in the code:
map<string, string>::iterator it = CCF::m_mPDN2GxSessionId.find(ipaddress);
(gdb) p ipaddress
$3 = "10.3.1.4"
But somehow the iterator is pointing to end of map i.e it is not able to find this ipaddress ?
Not sure what I am doing wrong ?
thanks,
~pdk
-
Re: std::map find
Sorry this was mistake on my part. There are different ways to store ipaddresses in our legacy code and since the format was different, the map find was not able to find the key.
Sorry for this confusion. Hope you forgive for my basic c++ questions..
thanks,
~pdk