Question: Write this script in c++ language. (16 pts) Write a void function definition that opens an input file in the following manner: 1) Prompts the

Write this script in c++ language.
(16 pts) Write a void function definition that opens an input file in the following manner: 1) Prompts the user for a file name 2) Opens the file name provided and associates it with an input file stream 3) If the file did not open 28) , reads the name entered and echo prints the file name, a) Print out an appropriate error message b) Clear the input file stream (which will reset it) c) Repeat 1, 2 and 3 until a file name is successfully entered This function requires a single parameter - an input file stream The above steps outline what is necessary for a while loop. However, a compact if written properly do-while loop is more
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
