There is no standard way for you to make an existing file one record shorter.
There are various OS specific options though.
Binary files are often easiest to use if you have sayTRUNCATE(2) Linux Programmer's Manual TRUNCATE(2)
NAME
truncate, ftruncate - truncate a file to a specified length
SYNOPSIS
#include <unistd.h>
#include <sys/types.h>
int truncate(const char *path, off_t length);
int ftruncate(int fd, off_t length);
- a specific record value that indicates that a record has been deleted (as phantomotap suggests).
- a separate (and much shorter) index file containing a list of which records are valid, and which are deleted.
Adding a record becomes easier, as it's just a matter of locating a vacant slot in your data file.