Deleting the last set of data written in text file

Discussion in 'C' started by beon, Nov 8, 2006.

  1. beon

    beon New Member

    Joined:
    Nov 6, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi everyone,

    I have a problem here, I had tired to log a few set of data inside a text file before running a couple of function. Is there anyway to delete the data entered at the end of the program if there was no error in my function?

    thanks alot!!
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    It would be better if you dont write it immediately but have them ready to be written and when no error occurs discard it. Once written you need to read and re-write the needed by discarding the unwanted data.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice