Just a general C++ question:
How can I declare a class object in a narrow scope and be able to delete it outside of that scope?
Basically what I'm doing is creating a World class to hold all the objects (other class objects) relevant to a certain World State of a game. I have a function which is supposed to declare all objects, each dynamically allocated, and put it in a list private to the World class. From the list I'm able to do anything I want to the objects, but when I want to initialize to the next level (delete the current world object in main, make a new one, and call the Init function), I've found I have no way of deleting the objects from inside the World class. Does deleting world also delete all objects inside of it?
Even if that's so, I want to be able to somehow delete an object from the scope of the list, but that's not looking like it's possible.