I have a text file which looks like this (Example):
123456789 18-5-2014
985665547 23-12-2016
I've a read/write function in a while(!file.atEnd) construction like this:
while (!file.atEnd()) 
{
    if (date-currentdate<42) {
        ui->label->setText(number); //number is the number before the date in the text file
    //Here I want the function to delete the current line
    }
}
What I want is to delete the line that is just used in the if statement from my text file. By line (as example) I mean 123456789 15-5-2014.But how do I do this?
 
     
    