Sorry if the wording/terminology is not accurate as possible, I'm relatively new to this coding stuff.
So I have a .txt file named somefile.txt the contents of this file is as follows:
24 234 14
a8 267 35
35 378 28
b5 467 29
The file was loaded as follows:
#include <iostream>
#include <istream>
#include <fstream>
#include <string>
int main (){
ifstream inputfile;
inputfile.open("somefile.txt");
string contents;
while(!inputfile.eof())
{
getline(inputfile, contents);
cout << contents;
}
inputfile.close();
}
What I now want to do is to find out how many letters there are in this file and other files in the same format and of similar .txt files. For example, the somefile.txt has 2 letters that can be recognized by humans when they see the files contents. Is there a way for the computer to know/ calculate how many letters there are. I was also hoping that this could be done in a separate function if possible.
Hopefully this clears up my poor writing from before. Thank you again