This program illustrates the insert() member function for sets. Press Enter to continue ... First we create an array of name strings, and then a set of name strings from that array. Press Enter to continue ... Here are the 4 names in the set: Alice Dick Harry Tom Press Enter to continue ... Now we try to insert Bob into the set. Press Enter to continue ... Success! Bob is now in the set. Press Enter to continue ... Next we try to insert Dick into the set. Press Enter to continue ... Rats! That insertion did not succeed. Why not? Because Dick was already in the set. Press Enter to continue ... Now we try to insert Sam, Carl and Jack, in that order. Press Enter to continue ... Here are the names in the set after those three attempted insertions: Alice Bob Carl Dick Harry Jack Sam Tom Press Enter to continue ... And the names pointed to by the returned iterators of these three calls to insert() are: Sam Carl Jack Press Enter to continue ... Finally we create another set containing some names that are already in the set, and some that are not. Then we try to insert all of the names from this new set into the previous set using the insert() function. Some of them will go in, and some won't, because they are already there. Press Enter to continue ... Here are the names in the new set that we try to insert into the old set: Amy Dan Fred Harry John Tom Press Enter to continue ... Here are the names in the set after these attempted insertions: Alice Amy Bob Carl Dan Dick Fred Harry Jack John Sam Tom Press Enter to continue ...