Quote:
Originally Posted by Trev17
I have both functions (averageHigh, averageLow) being called in the program and the output for both is 0. If thats what you meant?
for the if (!File) how would you put that in so that it does something?
Ok, after looking at it a bit more, I'm pretty sure you have no data in your arrays. (I was talking about printin out the full arrays - a 'cout << temp[i][j]' type of action), but take a look at the for loop you have where you assign temperatures to the array.
You open the file, make sure it's open, but then look at what you declare in the comment as "array initialization". You set everything to 0. Your functions are probably working right, because there's no info in them.
You have File declared, you just need to read the elements in from file into the proper place. I'll give you a hint, you'll need to wrap the for loops in a while loop, and after that, instead fo assigning a place in the array 0, you need to assign it the next value from the file.
Does that help?