I just ran your program and it worked...What are you using for data in your data01.dat file?
Mouche commented: Good example of buffer overflow +5
beejay321 commented: wrong comment, i did that and it messed it up, i did what i had originally and it was fine +0