I'm writing a code that replaces the word read with the word study. So for the first sentence the correct answer will be I'm studying. The assignment requires that the strings are const. And also that the it shouldn't matter if read is written with big or small letters. The problem that I have is that I get no output at all.
In the while loop, don't you need to change the value of pos to look for the next occurrence of the word you're trying to find? Otherwise it seems you have an infinite loop.