I'm supposed to get a string with spaces, numbers, or punctuations to become alphabet characters only. When I run the function it says I am out of range.
For example, if I input "dogs are fun.", it should become "dogsarefun". Any help greatly appreciated, thanks.
quincy, on line 14 (of SamuelAdam's formatted post), you are comparing a character to an integer. While this is perfectly legal in C++, it probably isn't doing what you think it's doing.
You probably mean to be doing while (i < size)
Since you are erasing characters, you also probably want to update the size after an erasure.