I can give you at least one hint: you can't delete a single line from a
textfile, you've to copy the contents of the file you want over to a new
temporary one and rename that or you have to read out the entire
textfile into memory (e.g. a linked list where each line of the textfile
is one string) and overwrite the existing textfile (rewrite procedure)
with only those parts from your memory storage you want to keep.