@dhayden, thank you very much for your explanation.
Btw, when you wrote: "the for loop should be",you didn't change
that loop at all. Is it perhaps a mistake?
When it comes to changing line 19, I can't understand why I cannot live it the way it is.
The loop I wrote, doesn't it iterate throughout the whole string and checks for duplicates?
If so, where is the need to write:
if (i<sec_message.length()-1
?
With this being said, yes,I would love you to modify my code in whichever way works, but as a beginner, I struggle in understanding other people's code, with features I haven't learned yet.
That's why I am not very comfortable with JLborge's code.
@mikeyboy: when I read
When i is equal to sec_message.length() |
What I understand is, "when i is the last typed character, what happens to it?"
in fact, my answer was: if is a vowel, is erased.