Question
I asked this question previously on chegg and I'm not understanding the code to much, I'm suppose to accomplish this homework recursively. Could you please
I asked this question previously on chegg and I'm not understanding the code to much, I'm suppose to accomplish this homework "recursively." Could you please add comments and the missing declaration for identifies for this to work cause it also had a few errors. Thanks! //**********Code below***************
#include
void fill(){ while(true){ cin>>symbol; if(symbol=='E'){ cout>filename; std::ifstream infile(filename,std::ofstream::binary); std::ofstream outfile ("temp.txt",std::ofstream::binary); outfile.open ("test.txt"); cout>x; cout>y; cout>symbol; string line; while (std::getline(infile, line)){ if(x==0) break; outfile.write(line,line.length()); x--; } if(x==0 and line.length()>0){ line[y-1]=symbol; outfile.write(line,line.length()); while (std::getline(infile, line)){ outfile.write(line,line.length()); } } else{ while(x>0){ outfile.write(" ",1); } line=''; for(int i=0;i int main(){ return 0; }
Step 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