Car sorting problem

Why we are using vectors in place of arrays class ??..

Vectors provide more functionalities than the array class and is easier to use also. For more differences u search on google. Vectors are more commonly used and are dynamic in nature i.e. their size can also be altered and we can also return them from a function easily.