This is because erase call expects both the parameters to be iterators while in your first line you have called the erase function with an integer argument. Make appropriate change to the second argument of your first line to an iterator and it should be fine.
*Hint: Use the same trick you used in the second line. *
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734