Question: Help implementing code in C++. File validation: If the file fails to open, throw an invalid.argument exception with message: Cannot open file Note: If opening
Help implementing code in C++.

File validation: If the file fails to open, throw an invalid.argument exception with message: "Cannot open file" Note: If opening the file fails, the failbit is set. If the file name does not end with .csv" throw an invalid argument exception with message: "File not CSV file" Prompt for file name: The program should prompt the user for the name of a valid file (does not throw any of the above exceptions) using "Enter file name: The program should catch all of the invalid.argument exceptions and continually re- prompt until a valid file name is provided. All exceptions (for invalid data, missing data, and bad files) should be caught in the main function and the error message printed out, preceded by the message "Invalid File
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
