I was given an assignment to complete. I'm doing a library program which including borrow and return program. And here, i seek the advice on how to delete a line in a text file. My program work this way, when a student borrow a book, the studentid and the book code will be written in a file call relation.txt which contain 2 column ( studentid , bookcode), now what i want is the return program. When a student want to return a book, the program will ask for his studentid and the bookcode, and it will scan through the text file searching the number that match with the bookcode that being input by the student, after found it, it will delete that line in the text indicating the student already return the book. Do anyone has any idea how to write this program?