c++ program to count characters in a text file code example
Example: c++ program to count number of characters of words in a file using stringstream
string words[2000] = {""}; // fills all elements with blank string
int wordIndex = 0;
while( fileToBeOpened.good() && wordIndex < 2000)
fileToBeOpened >> words[ wordIndex++ ];