The following program will remove the last two lines from a file using C++