For the containers that have unique keys, the versions of insert and emplace that add a single element return a pair that lets us know whether the insertion happed. The first member of the pair is an iterator to the element with the given key; the second is a bool indicating whether that element was inserted, or was already there. If the key is already in the container, then insert does nothing, and bool portion of the return value is false. If the key isn't present, then the element is inserted and the bool is true.
As the code rewrited, it implements word-counting.
Look! How Crazy!!!
/**********************************************
* IDE: vs2013
**********************************************/
#include