Question: String deskFileName is a file's name read from input, and is opened as an input file. If inFS.is _ open ( ) returns false, then:

String deskFileName is a file's name read from input, and is opened as an input file. If inFS.is_open() returns false, then:
Output deskFileName followed by ": file error causing program to terminate" and a newline.
Terminate the program with the return value 1, so that the program does not proceed to read the file.
Click here for examples
Ex 1: If the input is data3.txt and:
Contents of file data3.txt
81
then the output is:
81
Ex 2: If the input is data7.txt, then the output is:
data7.txt: file error causing program to terminate

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!