Niels said:
None of the most used filesystems can insert data at a random place without
overwriting what is already there. So all operating systems and most
programming languages work in the same way. Databases use tree structures to
make it possible to insert data in the middle without overwriting anything.
Niels Dybdahl
Actually yes you can insert data at random places by utilizing the
RandomFile class. By supplying the length of each record, and the end
record number, you can reset the file size to the oldsize + newRec
length and boom you have an append. Also, you can write data into the
middle of a file without overwriting. All you have to do is create a
class that represents each row, read each record into the created
class, insert the new record at the appropriate point in the vector
during a For/While loop, and re-write the file using the data present
in the vector.
Storm