May 28, 2002 #1 raochetan Programmer Aug 20, 2001 62 IN Hi Everybody, How can i check, if a given key exists in the map? I want to process the values of the key if it exists otherwise insert the key in the map. Thanks in advance. raochetan
Hi Everybody, How can i check, if a given key exists in the map? I want to process the values of the key if it exists otherwise insert the key in the map. Thanks in advance. raochetan
May 28, 2002 #2 Jeffray Programmer Jan 29, 2002 144 CA use find theIterator = theMap.find(theKey); if(theIterator == theMap.end()){ // do your insertion here } Upvote 0 Downvote
use find theIterator = theMap.find(theKey); if(theIterator == theMap.end()){ // do your insertion here }