Hello. I get "Microsoft Visual C++ Runtime Library" error while trying to debug this code with Visual Studio 2013. It happens only if the last symbol is punctuation mark.
I think you should start with checking if the word you enter is a four letter word, and if it is, then you could have a for loop to replace the word with 'love'. You could also put a condition in there that checks if there is punctuation in your string, and to have it ignore it.