having some trouble with my program reading the file im trying to have it read this is what I have so far. it keeps displaying 1 when it should display -15
Given what you are trying to do its more effective to use a while loop to read the file. You can use an array if you know how many values are in the file or just use a vector.