case 5:
{
string line, name;
cout << "Please Enter the name of record you want to delete: ";
cin >> name;
ifstream myfile;
ofstream outfile;
myfile.open("StudentInformation.txt");
outfile.open("StudentInformation.txt");
while (!myfile.eof()) {
myfile>>line;
if(line==search){
if(line==";")
cout<< myfile.eof() << endl;
break;
}
}
cout << "The record with the name " << name << " has been deleted if it exsisted" << endl;
myfile.close();
outfile.close();
}
@codekiddy
@benbalach
I know how to search for a specific name information and output it, but my problem is that how to delete them, i don't know which code are using to do this,, or i haven't any idea how to delete them?!!!!