I have a map of pointers to objects, i want to delete some randomly chosen pointers and the objects they point to. Is it possible to do it without using libraries like boost ?
I assign the map as follows
map<int,particle*> particle_map;
particle* particles= new particle[number_of_particles];
for(i==0;i<number_of_particles;i++)
{
particle_map[i] = &particles[i];
}
now how to delete the key and the the object to which the pointer points ??