my problem is the following:
I've created a list of game titles in a vector.
Now I want that the user chooses which one to erase.
And here is the problem. How do I do it?
The line with the problem is the line, in which I try to call the erase function.
your problem may occured in: gameTitle.erase(gameTitle.begin(), title);
you can use erase operation only in this two modes: C.erase(p) or C.erase(b , e), p,b,e are all iterator.
so yuo must find the title and put the return value into an iterator,then erase it.
just like:
cout << "\Erasing a title.\n";
cin >> title;
iter = find(gameTitle.begin(), gameTitle.end(), title);
gameTitle.erase(iter);