Write the definition of a function named fscopy. This function can be safely passed two fstream objects, one opened for reading, the other for writing. Assume that the input source is a text file consisting of a sequence of newline character -terminated lines. The function simply copies, line by line, the entire content of the data source associated with the first argument to the data target associated with the second argument. No value is returned.

Write the definition of a function named fscopy. This function can be safely passed two fstream objects, one opened for reading, the other for writing. Assume that the input source is a text file consisting of a sequence of newline character -terminated lines. The function simply copies, line by line, the entire content of the data source associated with the first argument to the data target associated with the second argument. No value is returned.

LANGUAGE: C++

CHALLENGE:

Write the definition of a function named fscopy. This function can be safely passed two fstream objects, one opened for reading, the other for writing. Assume that the input source is a text file consisting of a sequence of newline character -terminated lines. The function simply copies, line by line, the entire content of the data source associated with the first argument to the data target associated with the second argument. No value is returned.

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days – Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level