Hello, I am new here and new to C++. I am trying to read around 4,000 lines from a text file, each line holds a number starting at 1 and going around 4,000 but missing a few numbers here and there. For some reason the first line that is read is 2,977 every time I run the program instead of line 1. Any ideas?
EDIT: I tried it with a new text file with new numbers and it still starts around halfway through the file...
Quick update.... The code works fine for small text files. When I changed my loop per L B's advice, the first line that is displayed is now 2,976 instead of 2,977. I can't figure out what I'm doing wrong here.
I copy/pasted the numbers that are in the text file, would that have something to do with it? Could it be a corrupt file?
Hey guys, thanks for the quick reply's. I figured out the problem, it turns out it was my screen buffer on the command console was set tto be too small.