Anonymous user
Collections: Difference between revisions
m
Spelling/grammar/aesthetics.
No edit summary |
m (Spelling/grammar/aesthetics.) |
||
Line 4:
=={{header|C++}}==
C++ has a range of different collections optimized for different use cases. Note that in C++, objects of user-defined types are mostly treated just like objects of built-in types; especially there's no different treatment for
Note however that C++ collections store ''copies'' of the objects given to them, so you'll lose any polymorphic behaviour. If you need polymorphism, use a collection of pointers (or smart pointers like boost::shared_ptr).
===vector===
A vector is basically a
#include <vector>
Line 203:
</pre>
In addition Python classes support a number of methods allowing them to implement indexing, slicing, and attribute management features as collections.
=={{header|Raven}}==
|