Re: Difference between Array and Vector
Posted By:
Jordan_Koppole
Posted On:
Monday, March 15, 2004 08:15 PM
Array
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,...
Vector
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.