what AmI missing? I am simply trying to read in an array from a txt file and count the words. What am I doing wrong....here is the function
int countwords(ifstream& infile, int wordcount[MAX_WORDS])
{
int count = 0;
for( int i=0; i < MAX_WORDS && infile; i++)
{
infile>>wordcount[i];
count++;
}
return count;
}