Re: Difference between Array and Vector
Monday, March 15, 2004 08:15 PM
1)Size of array need to be declared in advance.
2)Once declared array can't grow in size.
3)Array can store primitive data types.like int,char,...
1) No need to declare the size of vector. You may give its size & you may not.
2) Vector can always grow in size if you start adding more element to it than your declared size.
3) Vector can store only object references. Storing primitive data types is not possible in case of vectors.