Write a function named repalceSubstring. The function should accept three C-string or string object arguments. Let's call them string1, string2, and string3. It should search string1 for all occurrences of string2. When it finds an occurrence of string2, it should replace it with string3. For example, suppose the three arguments have the following values:
string1: "The dog jumped over the fence"
With these three arguments, the function would return a sting object with the value
"that dog jumped over that fence". Demonstrate the function in a complete program.
Include a screen shot showing the program compiles and runs with the output.
If the program does not compile, the screen shot should show the errors.
You can use getline to receive the string inputs from the keyboard,
you can use .find, .replace, etc... in the function replaceSubstring to accomplish the find and replace task.
i do have one assignment can you help for that ?