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

DDSurface list

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

In my program I''ll use a manager to maintain a list of directdrawsurfaces, which than can be used as textures. Because these textures will be accesed all the time, I want to avoid to extra overhead that using the STL gives. Another reason for this is that I''m not very familiar with the STL, and lack proper documentation. So my question is: will it be good practice to just create a static sized array, that can contain a max of like 500 textures? CDDSurface* m_lstSurfs[500]; Since this maximum will probably never be reached...and it provides O(1) access time, deletion and O(n) insertion... (because it has to search for the first NULL-pointer in the list) I think it''s a rather good solution. But I''m not really sure if this isn''t just a cheap hack. Thanks in advance for your opinions, Tristan

Share this post

Link to post
Share on other sites