However, I forgot that you need to make sure find isn't starting from the beginning. That's my bad. size_t find ( char c, size_t pos = 0 ) const;
Ok, so, make p 0 each time you search for a new letter, and change the if statement to:
if( (p=input.find(guess, p)) < string::npos){}
As you can see, we give it the value of p each time, which will start out at 0, then be the position of the next letter, and so on, until it becomes greater than the string size.