From 8e5b08b6807d7bca0ad86a77401b645c39cb05d8 Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Fri, 20 Oct 2023 10:45:08 -0400 Subject: [PATCH] formatting --- lectures/15_maps_I/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lectures/15_maps_I/README.md b/lectures/15_maps_I/README.md index 82c0f61..8de4f60 100644 --- a/lectures/15_maps_I/README.md +++ b/lectures/15_maps_I/README.md @@ -147,8 +147,10 @@ m.insert(std::make_pair(key, value)); insert returns a pair, but not the pair we might expect. Instead it is pair of a map iterator and a bool: std::pair::iterator, bool> - The insert function checks to see if the key being inserted is already in the map. + – If so, it does not change the value, and returns a (new) pair containing an iterator referring to the existing -pair in the map and the bool value false. +pair in the map and the bool value false. + – If not, it enters the pair in the map, and returns a (new) pair containing an iterator referring to the newly added pair in the map and the bool value true.