Question: Problem (5) [10 points] Write a cut function (in C++). This function should take as input two strings, one is the original string to be

 Problem (5) [10 points] Write a "cut" function (in C++). This

Problem (5) [10 points] Write a "cut" function (in C++). This function should take as input two strings, one is the original string to be cut and the other are the words that you want cut. You must remove all the "to cut" parts from the original string, then return this modified string. If the "to cut" part never happens in the original string, you should just return the original string. Note: you should only remove parts from the original string and not recurively from every generated string, see the example for clarification. You can also assume the to cut will not overlap with itself, as inthe case where: original-teelehe. to Cut="chee" original-"IaateteMMate" toCut="ate" returned string-"IateMM" (as "ate" only directly appears twice in the original string)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!