• Advertisement

Archived

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

Help with STL

This topic is 5941 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement

  • Advertisement