I specifically told you that it won't work with the EOF test ONLY in the while condiditon. I even explained why that is. You chose to ignore that completely. If you're going to do that in future, you can kiss my *** on the quarterdeck, in front of God and the admiral and everybody. Now listen up.

Code:
     while (!input.eof())
 	 {
        int t;
        input>>t;
        if (input.good ()) temp[count]=t;
        else 
        {
            if (input.eof ()) break;
            else 
            {
                cerr << "File input failed";
                return;
            }
        }
        count++;
     }