Dynamic Object Instancing

I'm trying to find a way to allow my program during runtime to create/delete instances of struct types instead of explicitly initializing all instances that might ever be used. In other words, something like incrementing the names of the objects and pointers as new objects are created, though I read you can't really increment type names. As an example of the effect I'm thinking of games where you can buy items which you can then drop on the ground, so you eventually have tons of instances of these items laying around.
You dynamically allocate them and store them in a container.
Would this help you solve your problem?
http://cplusplus.com/doc/tutorial/dynamic/

-Albatross
Last edited on
Topic archived. No new replies allowed.