Answered step by step
Verified Expert Solution
Question
1 Approved Answer
NOTE: THIS MUST BE CODED IN C++ Create programs using Visual C++ to solve the following problems. Be sure that each program includes the following:
NOTE: THIS MUST BE CODED IN C++
Create programs using Visual C++ to solve the following problems. Be sure that each program includes the following: 1) Header: //Your Name //Mrs. Polk //Program Description 2) Initialized variables 3) Comments for clarity 4) Whitespace for readability 5) Specific instructions for the user 1. replaceSubstring Function Create a New Project called YourLastnameReplaceSubstring. Write a function named replaceSubstring. The function should accept three C-string or string object arguments. Let's call them string1, string 2, and string3. It should search string1 for all occurrences of string2. When if finds an occurrence of string2, it should replace it with string 3 . For example, suppose the three arguments have the following values: string1: "the dog jumped over the fence" string2: "the" string3: "that" With these three arguments, the function would return a string object with the value "that dog jumped over that fence." Demonstrate the function in a complete programStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started