Thread: can't save 13th record in files

  1. #1

    Angry can't save 13th record in files

    please help me bcoz, u see i used 'typedef struct' to store an array about 100 record..and you see the problem is when i store it into .dat file it only allow me to store record that are not the other words, i can store file up to any size but when i store the 13th record in the files it will delete all the content in the file but there is nothing wrong if i straight away store up to 14th files or more until the 26th record ..and 39th record..a bit weird..and i check it many many times the codes is probably nothing wrong (based from what i've learned). I hope some of u guyz will help me ....for more information i use fwrite and the the fopen with 'w'.

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    My psychic abiltiy enables me to see your problem! Unfortunately I'm just way to tired to type up the lengthy description of the problem tonight.

    Perhaps if you post some code, some of the other, less tired, people will help you out...

    Hope is the first step on the road to disappointment.

  3. #3
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Visalia, CA, USA
    /me sees a whole lot of text and not a whole lot of code.

    I would suggest commenting out the line that looks like this
    if(record != 13)
       fwrite(record, sizeof(record), 1, fp);

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Save files move when folder moves
    By mill1k in forum C++ Programming
    Replies: 5
    Last Post: 04-03-2004, 04:35 PM
  2. how to write and save ini files like some apps do with their ini's
    By Mouse_103 in forum Windows Programming
    Replies: 1
    Last Post: 12-19-2003, 12:05 PM
  3. I Need To Know Some Things That I Can Put Into A Batch File
    By TheRealNapster in forum A Brief History of
    Replies: 1
    Last Post: 10-20-2003, 08:12 PM
  4. updating and deleting a record
    By Burritt in forum C Programming
    Replies: 2
    Last Post: 04-19-2003, 04:58 PM
  5. String sorthing, file opening and saving.
    By j0hnb in forum C Programming
    Replies: 9
    Last Post: 01-23-2003, 01:18 AM