Question: C++ Strings Program String I need some help with this program. So I have to write a function called eraseSubstring; however I am slightly confused
C++ Strings Program String
I need some help with this program.
So I have to write a function called eraseSubstring; however I am slightly confused on what the use of the function prototype is for? Cant I just call the function to perform the eraseSubstring? Can you clarify what the protoype is used for in this case.

Write a function called eraseSubstring that erases the sequences "by" and "BY" from a string. The function prototype is as follows: void eraseSubstring(string& input, string substr); Where "input" is the input string and "substr" is the substring that should be erased from the input string. In this problem, substr "HousebyParkB YTree", the output should be "HouseParkTree". Write a main program to ask the user to input a string. Then call the above function to erase the substrings from the input string, and display the result
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
