I have a problem with removing a line from text file. My file is about trains. It contains identificator,number of seats and description about the train. The user inputs ID so i have to find this line with the same ID and remove this line.
this is what i have written:
void trains::deleteTrain()
{
fstream dell("Trains.txt");
if (!dell.is_open())
cout<<"File failed to open!\n";
ofstream temp("temp.txt");