Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I\'m writing a C++ program where I have to make it so I can usethe command \"add

ID: 3617928 • Letter: I

Question

I'm writing a C++ program where I have to make it so I can usethe command "add <file_name.txt>" and it will add the contents of whatever is in the .txt fileto the bottom of another .txt file called dic.txt so for example if the contents of dic.txt is program
verb
1. To schedule as part of a program.
2. Computers: to prepare a program for.
computer
noun
1. A device that computes, especially a programmable electronicmachine that performs high-speed mathematical or logical operationsor that assembles, stores, correlates, or otherwise processesinformation.
And the contents of defs1.txt is engineering
noun
1. The art or science of making practical application of theknowledge of pure sciences, as physics or chemistry, as in theconstruction of engines, bridges, buildings, mines, ships, andchemical plants.
2. The action, work, or profession of an engineer.
3. Skillful or artful contrivance; maneuvering. then I could type into the program "add defs1.txt" and then dic.txt would have the contents: program
verb
1. To schedule as part of a program.
2. Computers: to prepare a program for.
computer
noun
1. A device that computes, especially a programmable electronicmachine that performs high-speed mathematical or logical operationsor that assembles, stores, correlates, or otherwise processesinformation. engineering
noun
1. The art or science of making practical application of theknowledge of pure sciences, as physics or chemistry, as in theconstruction of engines, bridges, buildings, mines, ships, andchemical plants.
2. The action, work, or profession of an engineer.
3. Skillful or artful contrivance; maneuvering.
I'm writing a C++ program where I have to make it so I can usethe command "add <file_name.txt>" and it will add the contents of whatever is in the .txt fileto the bottom of another .txt file called dic.txt so for example if the contents of dic.txt is program
verb
1. To schedule as part of a program.
2. Computers: to prepare a program for.
computer
noun
1. A device that computes, especially a programmable electronicmachine that performs high-speed mathematical or logical operationsor that assembles, stores, correlates, or otherwise processesinformation.
And the contents of defs1.txt is engineering
noun
1. The art or science of making practical application of theknowledge of pure sciences, as physics or chemistry, as in theconstruction of engines, bridges, buildings, mines, ships, andchemical plants.
2. The action, work, or profession of an engineer.
3. Skillful or artful contrivance; maneuvering. then I could type into the program "add defs1.txt" and then dic.txt would have the contents: program
verb
1. To schedule as part of a program.
2. Computers: to prepare a program for.
computer
noun
1. A device that computes, especially a programmable electronicmachine that performs high-speed mathematical or logical operationsor that assembles, stores, correlates, or otherwise processesinformation. engineering
noun
1. The art or science of making practical application of theknowledge of pure sciences, as physics or chemistry, as in theconstruction of engines, bridges, buildings, mines, ships, andchemical plants.
2. The action, work, or profession of an engineer.
3. Skillful or artful contrivance; maneuvering.

Explanation / Answer

please rate - thanks #include #include #include using namespace std; int main() {int i; string filename; ofstream file; ifstream in,in2; string input; int start,stop; file.open("dic.txt", ios::app); if(file.fail())            //is it ok?     { cout