Question: #include #include Using namespace std; Int main ( ) { / / Array to store the frequency each chapter int charCount [ 1 2 8

#include
#include
Using namespace std;
Int main (){
// Array to store the frequency each chapter
int charCount [128]={0};
//file name
string filename;
// get the file naemfrom the user
Cout <<" Enter the name of the text file:";
cin>> fileName;
//open the file for reading
Ifstream inputFile(fileName);
//check the file open successfully
if(!inputeFile.is_open()){
cerr <<"Error opening fill: "<= tolower(ch);
// Check if the character is a letter if (isalpha(ch)){
// Increment the count for the
character charCount[ch]){ if (charCount[c]>0){ cout < c c<": "<< charCount[c]
< endl; }
}
return 0 ;
}
Can you check please what is wrong with it and why this program shows error?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!