First off, lets look at two code segments. The first is your original while loop, the second is writeTotal.
/* ... */
// the while loop:
while (!inStream.eof())
{
writeTotal(letterCount);
}
/* ... */
// writeTotal
void writeTotal(int list[])
{
int index;
for(index=0; index<26; index++)
cout << static_cast<char>(index+static_cast<int>('a')) << "(" << list[index] << ")" << endl;
}
Your loop is based of whether you've reached the end of the file. If you have not, you call writeTotal. That outputs the total from the array. It doesn't change the file, so you keep looping (thousands of times, if you let it go that long).
Second, using eof() might not be the best way to check for file state (see
http://www.daniweb.com/techtalkforum...155265-18.html; and kudos to Dave Sinkula for posting it in another recent thread.

)
[edit:] So I tinkered with the code a little bit to get it working, and there were some things I noticed. You don't initialize letterCount, so whatever values you get as your result will likely be on the order of -1203455802 or similar. That can be fixed by calling
initialize(), or just having
int letterCount[26] = {0}; and the compiler will autofill the array with 0.
Next, you never call characterCount. This is the critical part of your program. I'd recommend that you change it to accept a string instead of a character, but that's up to you. Either way, there's also no check in place to make sure the char is a letter or not. You can
#include <cctype> to get the
isalpha(char) function.
Third, writeTotal should not be inside the loop, unless you want to see all 26 counts each time one of them changes. A little extreme in my opinion.