Question: In C++ Rewrite (DO NOT COPY PASTE) the copy program shown below as a reusable function component with two argumentsspecifically, the input and output file
In C++ Rewrite (DO NOT COPY PASTE) the copy program shown below as a reusable function component with two argumentsspecifically, the input and output file streams. The function should return an integer indicating the number of lines copied (0, if the input file is empty). NOTE: You need to create your own file InData.txt with 10 elements.
// File: copyFile.cpp // Copies file InData.txt to file OutData.txt #include
#include cout // Copy one line of text from one file to another // Pre: ins is opened for input and outs for output // Post: Next line of ins is written to outs. // The last character processed from ins is return charCount; } // end copyLine 
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
