Hi everybody. I have taken a different approach to the writing of this code. However, when I try to run it, it says possible loss of precision and highlights this line: " theTemps[index] = inFile.next();". I am wondering why it says possible loss of precision. Thanks
David Barry wrote:What do you think my third problem is? I now have this code that compiles, but does not print out my doubles from the text file.
Your 3rd problem is that your index is not moving. To take someone else's example, you are smashing each new egg you pick up from inFile, into the same spot, every time through the loop. What happens to the metaphorical eggs, is what happens to your previous numbers.
you need to be incrementing the value of index, each time through the loop.
Finally, you might encounter a fourth problem (ponder what happens when there are more than 14 values in the file you are reading)
Joined: Oct 13, 2005
You would have done better to post this as a continuation of your earlier thread. And I have already told you "Somebody please take a look at this" is not a suitable thread title.
I am not getting at you. We want to help, but it is more difficult if you don't keep threads together, or use such vague titles.