I've been learning how to read and write to files in cpp. For a reason I cannot figure out, my last piece of data in the file is read twice. Is someone able to tell me why this is? I'm 100% positive that the piece of data is only in the file once.
Thanks, I was inputting data into the file using a loop and I have an endl; after the last piece of data. I guess I have to break the loop early before the last piece of data so I don't leave a blank at the end.