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.
if (input.good ()) temp[count]=t;
if (input.eof ()) break;
cerr << "File input failed";