I have an STL list which holds references to a list of entities which are dynamic in my program. I am using an iterator to go through this list of items. I am trying to do the following which doesn't seem to be working
However when I call (*itor)->SetPosition it looks like instead of referencing its doing a copy so its not affecting the value at all. I suppose that its supposed to work that way. However I would like to know how to make the SetPosition to work.
std::list<Entity *>::iterator itor = this->m_EntitiesList.begin();
while(itor != this->m_EntitiesList.end())
vector3 view = m_pCamera->GetTarget();
(*itor)->SetPosition(view.x, 0.0f, view.y);