in an answer to this question I have been informed that my problems lie to the call to a copy constructor in the code below. However, I just don't see where it's being invoked. Nowhere am I doing something like agents[1] = agents[0];
although clearly I don't understand something. Where is this copying occurring and how can I change it so it's just making new objects each time?
I have been
int main()
{
Level* level;
std::vector<Agent> agents;
level = new Level(agents);
for (int i = 0; i < 1; i++) // this will be more than 1 in the future.
{
agents.push_back(Agent(100, *level, agents, level->Pickups(), D3DXCOLOR(1.0F, 0.4f, 0.4f, 1.0f)));
}
delete level;
}