Write a program that will substitute one string for a new string throught the te
ID: 3567864 • Letter: W
Question
Write a program that will substitute one string for a new string throught the text. There will be several sets of strings for this program assignment. The first word on a line will be replaced by the second word listed on the same input line. There are several pairs of words for substitutes. The flag to indicate the end of the word pairs is a '$'. Following the '$' (next line) is the text that will be used in the word substitution.
This pogram needs to be written once in C-String data and functions, and once using C++ String Class data and functions.
Explanation / Answer
int main() { char fName[255]; char lName[255]; int result; string temp, fileContent; string fullName; string str1 = "#FIRST NAME#"; string str2 = "#LAST NAME#"; ifstream fin; ofstream fout; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.