Hey Nico Basically thats exactly what i was doing wrong :) i didnt fill the name array upon initialization. so when it was output to the fill first time the txt file looked like this. gav 300 0 0 0 0 0 0 0 0 0 then when they were read back in the next time the function was called it was putting 0 into the names array as the >> command doesnt take in white space. then it passed in that number which i assume is an end of file flag and put it into the array also. by just initilizing the name array with details it avoids this problem as the details are sent to the file on the very first run. gav 300 ... 0 ... 0 ... 0 etc thanks again fro help
>From: "Nico Heinze" <[EMAIL PROTECTED]> >Reply-To: c-prog@yahoogroups.com >To: c-prog@yahoogroups.com >Subject: [c-prog] Re: text files again >Date: Tue, 10 Apr 2007 07:24:36 -0000 > >--- In c-prog@yahoogroups.com, "GLOGIC 20" <[EMAIL PROTECTED]> wrote: > > > > Damn you were too quick for me i had just figured out what > > i was doing wrong and was writing the email when i got urs! > > thanks > > gav ><snip> > >And what was the final solution? >I think the problem was that your reading loop terminated incorrectly; >iCount should never have reached a value of 7 because there are only >five pairs of values in the save file! >Typical case of wrongly set loop counters, I would suspect. > >Regards, >Nico > _________________________________________________________________ Mortgage rates near historic lows. Refinance $200,000 loan for as low as $771/month* https://www2.nextag.com/goto.jsp?product=100000035&url=%2fst.jsp&tm=y&search=mortgage_text_links_88_h27f8&disc=y&vers=689&s=4056&p=5117