Did you miss parenthesis? That's a function.
eyes[l].erase();
Edit: Seems I misread you question. If is is stl::vector erase then you can take hint from code below: You will have to use iterator.
vector<int>::iterator it = res.begin(); for( ; it != res.end(); it++) { it = res.erase(it); }