Write a cpp program that reads from a file name specified


Problem

Write a C++ program that reads 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 SPECIFIED INPUT FILE NAME.", and exit. If the file cannot be opened, print on a new line "CANNOT OPEN THE FILE ", followed by the file name, and exit. The program should read from the file lines until the end of file. In case the file is empty, print out on a new line the message "File is empty." and then exit.

The program categorizes words into four groups based on the number of vowel letters (a, e, i, o, u) found in them. Those groups are the words with no vowels, the words with one vowel, the words with two vowels, and the words with three or more vowels. The program should create a simple directory for each group of words using the container. The simple directory for each group maps a word as a key to an integer value for the number of occurrences of that word in the file. The program should print out the total number of words in the file, and the number of words belonging to each group. In addition, the program prints out the lists of words in each group in order.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a cpp program that reads from a file name specified
Reference No:- TGS03232659

Expected delivery within 24 Hours