Hi I'm trying to do this (and it seem works):

Qt Code:
  1. std::vector<Light*> light; // it's a vector of pointer to Light
  2. Light* l;
  3. l = new Light[10];
  4. light.push_back(l);
  5. delete [] l; //delete is necessary
To copy to clipboard, switch view to plain text mode 
I I understand fine, this is a vector of Light with only one element(a pointer) that point to an array of 10 Light. Is it this?
Otherwise:
Qt Code:
  1. std::vector<Light*> light; // it's a vector of pointer to Light
  2. Light* l;
  3. l = new Light;
  4. for (int i=0; < 10< i++)
  5. light.push_back(l);
  6. delete [] l; //delete is necessary
To copy to clipboard, switch view to plain text mode 
Here I've a vecotr of 10 elements (pointer) that each one point to a Light;
Qt Code:
  1. std::vector<Light> light;
  2. for (int i=0; <10; i++)
  3. light.push_back(Light());
To copy to clipboard, switch view to plain text mode 
I prefer the last....
Wich is better? Thanks