Please program in C++
The final program converts a numeric error code into a message. The program will read in the error code and output the error message. See the table below for the error codes and the associated message. (This will be a short program.)
Error Code Message
-1 File Not Found
-2 Invalid File Format
-4 Out of Memory
-8 Invalid Operation
<anything else> Unknown Error
You are required to write at least 6 tests for your program. You need to specify the error code and the associated message. Try to cover as many possibilities as you can. Put these in the comments for your main function so they are easy to find. You can do something similar to what was done in earlier labs.
To get full credit, you must meet the following requirements:
a. The program must read in the error code from cin
b. Output the value read in (error code and the error message)
c. Use a switch statement to pick the correct error code
Format all of your code. You can select the text in a file and press Ctrl + K, Ctrl + D. This will do most of it for you.