Hello I have a predicament trying to read integers and placing them into an array and finding the max and min. Theres 500 of them and all separated by line:
200
300
400
My current code is this and Im pretty sure Im way off, plus the program crashing on debug isnt helping.
You are trying to read from closed file.
Not to mentons that while (!input.eof()) is terribly wrong.
Also counts[x] if x is smaller than 0 or larger than counts size.
if (x > x) is always false. Perharps you meant if (x > max)
Same for min.