Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 resultStep 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