May 28, 2002 #1 raochetan Programmer Joined Aug 20, 2001 Messages 62 Location 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 Joined Jan 29, 2002 Messages 144 Location 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 }