Archived

This topic is now archived and is closed to further replies.

Ratman

Help with STL

Recommended Posts

Ive got some crude implementation of this myself, but I think its causing memory leaks, and it "doesnt always work". Im pretty sure Im doing it wrong. Can someone help me: I want to keep a list of all objects in my game (pretty standard game prog technique). Do I want keep a list of pointers, or keep a list of objects, and get pointers from them? Like this: using namespace std; typedef list ObjectList; typedef ObjectList::iterator ObjectListIterator; or using namespace std; typedef list ObjectList; typedef ObjectList::iterator ObjectListIterator; Does that make sense? Can someone straighten me out and possibly give me a simple example of adding and removing objects? Thanks a lot Ratman --------------- Ratfest.org

Share this post


Link to post
Share on other sites