I am trying to write a method that removes an integer from a vector, but it gives me the following error.
use ‘&’ to create a pointer to member.
The method is:
1 2 3 4 5 6
//TODO removes item from the bag; only one occurrence of item should be removed.
void Bag::remove(int item)
{
bagOfMarbles.erase(bagOfMarbles.begin + item - 1), bagOfMarbles.end;
}