Dynamic Array class

Started by
2 comments, last by Chmod007 24 years, 7 months ago
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 <=

=> Arfa <=
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?
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?

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

This topic is closed to new replies.

Advertisement