Question: Write a C++ Boolean value-returning function definition called OpenFile with 2 parameters. - The first parameter, a string, contains the name of the file that
Write a C++ Boolean value-returning function definition called OpenFile with 2 parameters.
- The first parameter, a string, contains the name of the file that is entered for opening.
- The file name entered in the function must be made available to the caller of the function.
- The second parameter, an ifstream, represents the input stream to use
- The function prompts the user for the name of the file to open and opens the file
- The function returns a value of true if the file was successfully open and a value of false if the file was not successfully opened.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
