Program Not Recognizing Input File

I am converting a console IO program to a file IO program. The program worked perfectly as a console IO. I thought I made the appropriate changes to the program. It compiles, and when I run it output does go to my output text file, but the output is the same as if the input text file was blank. No matter what I do to the input text file the output text file is the same, so somehow my program is not reading it. I know that I spelled the input file name correctly when opening it in the program. Here is the program, thanks for any suggestions.

Yeah the thing is that I already know it is not reading any input at all from the text document. For example when I cout a variable that was defined by a cin statement, some huge negative number comes out. I just don't know why the program isn't reading my data from my infile text document.

So print out avgRain[x] between lines 21 and 22 (as WaltP was suggesting) check to make sure you're getting something there. You also don't check the status of the file with the is_open() method. It may be that you're trying to open something in a directory outside of the one where the program is executing. Do some tests. Make your data file simple initially, one line or one or two numbers and then substitute in your real one once it's working.