Hello, I'm not very good at coding. My assignment was to open a file and do different things to it. The file is a baseball themed filed with information about players. I have to erase players that didn't come back. My idea was to have them enter the players who don't come back. Here is my code for that section so far:
//menu option 3: delete player
else if (menuOption == 3){
string playerId = "",
lastName = "",
firstName = "",
division = "",
team = "";
//determine whether file was open
if (outFile.is_open())
{
string playerId;
cout << "Who did not return? Enter Player ID. Enter Done when finished." << endl;
cin >> playerId;
getline(cin, playerId);
while (playerId != "Done")
{
string playerId;
playerId.erase()
}
Since I don't know what the subscripts would be for the players they want deleted because it would be random, that's where I got stuck. If you could help me with this code or come up with a better way, thanks!