I have an old project that was built using visual studio 2003 and I recompiled it with vs2005 recently. However, during runtime, I get the following error:
list iterator not incrementable
I traced the program to this function:
void InputQueue::update()
{
list<PCB>::iterator iter;
list<PCB>::iterator iterTemp;
for(iter = begin(); iter != end(); iter++)
{
if(iter->arrivalTime == 0)
{
ReadyQueue::getInstance()->add(*iter);
iterTemp = iter;
iter++;
erase(iterTemp);
}
}
}
I'm not a C++ expert and this is as far as the VS debugger got me. Could somebody explain to me what the problem is?
Thanks