Archived

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

A Question regarding a line of code in the enginuity tutorial.

This topic is 5042 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

I am seeing this sort of code alot in the enginuity tutorial and i havent seen in the C++ book im reading. Can someone help me on what it means? static std::list liveObjects; I copied it fromt he Memory Managemnt section of the tutorial. regards, ACE

Share this post


Link to post
Share on other sites
std::list is from the STL C++ library. and list is just what it says a list i believe it''s implemented like a linked list (but don''t take my word for it, just guessing really).

Share this post


Link to post
Share on other sites
its a static variable of type std::list from the std namespace. if its in a class then it will have the same value or list of objects for every copy of that class.

Share this post


Link to post
Share on other sites
Yes, and the standard library has a bunch of other containers as well, like vector (dynamic array), queue, stack, etc. All of which are also templates, so can be used to hold whatever type you want.

Share this post


Link to post
Share on other sites