Write a program that reads text from one file and writes anedited version of the
ID: 3616660 • Letter: W
Question
Write a program that reads text from one file and writes anedited version of the same text to another file. The edited versionis identical to the unedited version except that every string oftwo or more consecutive blanks is replaced by a single blank. Thus,the text is edited to remove any extra blank characters. Yourprogram should define a function that is called with the input- andoutput-file streams as arguments. If this is being done as a classassignment, obtain the file names from your instructor.
Explanation / Answer
please rate - thanks #include #include using namespace std; int main() {int i,j,t; char a,prev='a'; ifstream in; ofstream out; in.open("input.txt"); //open file if(in.fail()) //is it ok? { 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.