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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!