C++: Insert or Update a Map

Updated post here: https://codeyarns.github.io/tech/2011-01-11-c-insert-or-update-a-map.html

3 thoughts on “C++: Insert or Update a Map

  1. Thanks for the information. Map-insert was causing one issue for me. On insertion to the Map<K,V> where V was a structure which is having a wrapped string element. The length of the string element was getting 0 if the K is already existing in the map and from there, my issues started. After using the subscript operator, thing started working fine.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.