that's not the actual code I have and you're right about oEnemies should have the [i] I just didn't notice for this lol... anyway.
Peter NPC is a base class and cannot have an instance of itself.
I will try that Zhuge but the idea is to have pointer to each element of the array not the array itself.
Why can't I have
1 2
NPC** oEnemies = new Pig*[numPigs];
...this works fine but doesn't allow me to store all my devired NPC types.
Pig** oPig = new Pig*[numPigs];
Edit: zhuge, I tested what you said out and it is what I thought. It doesn't create pointers to each element of the array only the array itself which isn't what I need.
Ah, i see what you mean peter, thanks for clearing it up. Initialize the npc array with new npc's then store my derived pigs or whatever inside. I guess that answers that and i'll need to use a vector list or map to store them the right way i guess like cire has shown.