Quantcast
Channel: How to find if a given key exists in a std::map - Stack Overflow
Viewing all articles
Browse latest Browse all 16

Answer by Muhammad Ahmad Zafar for How to find if a given key exists in a std::map

$
0
0
map <int , char>::iterator itr;    for(itr = MyMap.begin() ; itr!= MyMap.end() ; itr++)    {        if (itr->second == 'c')        {            cout<<itr->first<<endl;        }    }

Viewing all articles
Browse latest Browse all 16

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>