Thread: external files

  1. #1
    Registered User
    Join Date
    Mar 2003

    external files

    How do you delete data from an external file from within your program? I am using arrays to store names and phone numbers and saving them to an external file. I need to be able to delete data from the same external file.

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    There are no methods to delete or remove bytes in the middle of a file. You can replace existing bytes with new ones. For example: "123" => "1A3". If you want to do something like "123" => "13", you have to copy the file, ommitting the part you want to "delete". This goes the same for inserting data.

    If you don't want to copy the file to delete, you can "mark" the record as deleted.


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  2. Installing Direct X
    By bumfluff in forum Game Programming
    Replies: 36
    Last Post: 11-15-2006, 07:18 PM
  3. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  4. Music in C++ and external files
    By yucaplan in forum C++ Programming
    Replies: 1
    Last Post: 05-20-2005, 11:00 AM
  5. Problem with OpenGL tutorial
    By 2Biaz in forum Windows Programming
    Replies: 18
    Last Post: 09-16-2004, 11:02 AM