case DELETE_TITLE:
std::cout << "Game to remove from list: ";
std::cin.ignore();
getline(std::cin, gameTitle);
for (iter = gameList.begin(); iter != gameList.end(); ++iter)
{
if (gameTitle == *iter)
{
std::cout << "Found in list\n";
std::cout << gameTitle << " was removed from your list.\n";
//gameList[std::distance(gameList.begin(), std::find(gameList.begin(), gameList.end(), gameTitle))].erase();
// Tryed but it doesn't work :o please help and explain a solution if you can would help greatly!
}
}
break;
It deletes the text from the string but not the index it self.
It deletes the text but when I print the list of game titles it has it there blank. I want it to completely remove the object from the vector from where it was deleted