All pastes #489002 Raw Edit

Mine

public text v1 · immutable
·published 2007-05-15 09:14 UTC
rendered paste body
bool EntityContainer::deleteEntityByName( std::string name )
{
	//std::vector <Entity*>::iterator toDel = this->getEntityIter(name);
    Entity* toDel = getEntityByName(name);
    if(toDel != NULL)
        this->entities.erase( toDel );
    return true;
};

-----------------


entitycontainer.cpp(37) : error C2664: 'std::_Vector_iterator<_Ty,_Alloc> std::vector<_Ty>::erase(std::_Vector_iterator<_Ty,_Alloc>)' : cannot convert parameter 1 from 'Entity *' to 'std::_Vector_iterator<_Ty,_Alloc>'
        with
        [
            _Ty=Entity *,
            _Alloc=std::allocator<Entity *>
        ]
        No constructor could take the source type, or constructor overload resolution was ambiguous