Question: Write a program that, given the name of a text file, reads that file and counts the number of occurrences of each alphabetic letter in
Write a program that, given the name of a text file, reads that file and counts the number
of occurrences of each alphabetic letter in the file. Your program should print out the
occurrences result on the screen and ask the user to enter a file name to store the result.
Your program should use a vector of length to count the occurrences of the
alphabet letters, and treat upper and lowercase instances of a letter as the same letter.
Hint:
Use vector occurrences;
Use tolowerletter function if the letter is uppercase slide of the lecture note
using classes;
Use letter a as the index for the vector occurrences, ie occurrences lettera
Therefore, occurrences expresses the occurrences of a occurrencesb
Example: In a file that said Hello World the vector occurrence would look like:
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
