Jump to content
  • Advertisement

Archived

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

Chmod007

Dynamic Array class

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

STL is great for what you want to do. Not sure how fast it is but I don't think it'd be any slower than if you did it yourself.

The STL library should be included with your C++ package. It comes with g++ (including DJGPP) at least.

Try and search for the C++ Annotations document. This explains the STL classes in some detail. I can't remember where it can be found, but no doubt someone will know where to find it.


------------------
=> Arfa <=

Share this post


Link to post
Share on other sites
Advertisement
I can't find a fuction in vector to aid in moving objects. i want to be able to move an element from any pos to the first pos. any ideas on how this might be done?

Share this post


Link to post
Share on other sites
I am in great needs of a good array class. I need features like sorting, moving and removing elements.

Any ideas. is STL a good choice? where can I find it?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If you want to be STL conform you have to use
template
std::swap( T& iter1, T& iter2 );
with iterator referencing the positions
(so you could use pointers in a vector,
but better is using iterators at the positions)
Refer to your documentation or buy a good book on STL for better understanding of iterators

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!