Ошибка в void DestroyBodies(vector & bodies)
void DestroyBodies(vector<CBody*> & bodies)
{
for (vector<CBody>::iterator it = bodies.begin(); it != bodies.end(); ++it)
{
delete *it;
*it = NULL;
}
}
Что мне делать? Выводит ошибки
- error C2259: 'CBody' : cannot instantiate abstract class (похоже в этом вся проблема)
и соответственно:
- error C2440: 'initializing' : cannot convert from 'std::_Vector_iterator<_Ty,_Alloc>' to 'std::_Vector_iterator<_Ty,_Alloc>'
- error C2679: binary '!=' : no operator found which takes a right-hand operand of type 'std::_Vector_iterator<_Ty,_Alloc>' (or there is no acceptable conversion)
- error C2440: 'delete' : cannot convert from 'CBody' to 'void *'
Источник: Stack Overflow на русском