...
Upon encountering the first "Harry", it successfully removes the entry and the size of the vector diminishes to 3
. Awkwardly, the index of the Enumeration does not decrease by 1
leading the program to use "Tom" for the next (now final) comparison. ThusAs a result, the second "Harry" continues to remain in the vector unscathed, having shifted to the second position in the vector.
...