This function deletes the word the user types, however I can't get it to delete the whole line. The text file is using XML passers like so:
<vehicle><reg>OT88VVN</reg><make>Vauxhall</make><model>Astra</model><colour>Blue</colour><eng>1.2</eng></vehicle>
if(option == "DELETE")
{
string line;
string deleteline;
ifstream in;
in.open("plates.txt");
ofstream out;
out.open("temp.txt");
cout << "Enter Number Plate to be Deleted" << endl;
cin >> deleteline;
while( getline(in,line) )
{
if(line != deleteline)
{
out << line << endl;
}
}
in.close();
out.close();
remove("plates.txt");
rename("temp.txt","plates.txt");
}