Answered step by step
Verified Expert Solution
Link Copied!

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++

image text in transcribed

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 program

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Distributed Relational Database Architecture Connectivity Guide

Authors: Teresa Hopper

4th Edition

0133983064, 978-0133983067

More Books

Students also viewed these Databases questions

Question

1. Is this appropriate?

Answered: 1 week ago