DEQUE =ERASE ELEMENT

WHY IS THE COMPILER REFUSING TO ACCEPT Rcall.erase(itr); ???

void delSchdlTask(std::deque<CList> &Rcall, string Taskn)
{ string sfn="";
int i=0;
if (!Rcall.empty()){
for (std::deque<CList>::reverse_iterator itr = Rcall.rbegin(); itr != Rcall.rend() ; ++itr, i++){
CList &rv=*itr;
sfn=itr->fname;
if(sfn==Taskn){
Rcall.erase(itr);
}
}
}
}
erase doesn't work with reverse_iterator.
Topic archived. No new replies allowed.