Question: Write a C++ program that creates a simple directory for the occurrences of printable characters read from an input file. The program should read from
Write a C++ program that creates a simple directory for the occurrences of printable characters read from an input file. The program should read from a file name specified in the command line as an argument, However, if no file name is provided, the program should print on a new line "No file is found", and exit.If the file cannot be opened, print on a new line "File cannotbe opened: ",followed by the filename, and exit.The program should read from the file wordsuntil the end of file.If the input file is empty, print out on a new line themessage "File is empty."and then exit.A word is defined as a contiguous number of non-whitespace characters separated by whitespace.The program should keep a record of the number of occurrences of each letter, decimal digit (0-9), and any non-alphanumeric characters (e.g., ., ,, @, etc.)in a directorybuilt using the
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
