Below is a snippet from my code. I want to remove the string that the user enters from the current file.
void del(std::string filename){
using namespace std;
string x;
cout << "What item do you wanna delete";
cin >> x;
ofstream myfile;
myfile.open(filename);
}
I am thinking that I can locate "x" in the file and then remove it, but I'm not sure as to how to go about it.