Part 1: MyStringFunctions Set up an empty, console C++ project called MyStringFu
ID: 3557960 • Letter: P
Question
Part 1: MyStringFunctions
Set up an empty, console C++ project called MyStringFunctions. Then, add a Source File to the project named MyStringFunctions.cpp.
Implement all of the functions described below. Each function should be called and tested from main many times to prove to your self that it works correctly.
A myErase function that takes in an integer and a string. It should erase the letter from the string at the given index and then return the new, smaller string.
If the index is bigger than the length of the string the function returns the string unchanged. Do not use the erase member function of the string class.
A mySubstring function. This function takes two strings and if the first string is a substring of the second string it returns an index indicating where the substring starts. Otherwise it returns -
Explanation / Answer
3)