what is the difference between array, arraylist & vector?
what is the difference between array, arraylist & vector?
Collapse
X
-
Tags: None
-
An array is a fairly basic type, you have to do or at least consider all the memory management yourself.
ArrayList (.NET) and vector (STL) are both objects that encapsulate the functionality of an array but provide memory management for the user and some additional functions.
Generally speaking in an object orientated environment an object implementing an array is better and mmore maintainable than an array, particularly if the array was to be dynamically sized or resized.
Comment