Well, recently I came back to C plus plus, and I was so confused when I started using it again. Anyways, I need to write a program in which the user enters a single string. It is necessary to select one word and replace it with another of the same length, print a new sentence. And then, delete that same word and write a new sentence without that word. If anyone could help I would really appreciate it!.
To replace this word with another word, you can use string::replace(starting_index, length, "replacement string"). https://www.cplusplus.com/reference/string/string/replace/
Or, you could do a for loop yourself and replace one character at a time since it's the same length.