Reading from file problems

This is a discussion on Reading from file problems within the C++ Programming forums, part of the General Programming Boards category; I am trying to read from a text file (attached) i want to read each value into a structure but ...

Reading from file problems

I am trying to read from a text file (attached) i want to read each value into a structure but for some reason when i read in the first value of the text file,an integer ID number, it doesnt read it in correctly it has some other number. The rest of the file reads in correctly apart from this ID number.

If someone could have alook at the code and point out any errors i would be greatful!