The number of elements of an array must be defined when 1:array is defined, and vectors do not need to be, and can only contain integer literal constants, enumeration constants, or integer const objects initialized with constant expressions. A const variable that is not a const variable and whose value needs to be known at run time cannot be used to define the dimensions of the array.
The space defined by the 2:array is fixed and cannot be changed, and the vector is much more flexible and can be added or reduced.
3:vector has a series of functions that are very convenient to use. Unlike vectors, arrays do not provide push--back or other actions to add new elements to the array, and once the array is defined, new elements are not allowed, and if necessary, a new memory space is allocated. The element of the member array is then assigned to the new memory space.
4. Unlike vectors, an array cannot be initialized with another array, nor can an array be assigned to another array;
Comparison of array and vector in C + + arrays