I was attempting to build a program that would read a string of words that were entered using a vector and put them in alphabetical order without repeating any words. The program repeats the words depending on how many elements the vector has though. I'm not sure why this is? Any help would be appreciated.
Do you see where your while loop ends? Hint it is not on line 14
I know that one-liners may or may not have curly braces surrounding them, but I always put them anyways to avoid strange errors like this.