Perhaps you are wondering why C++ has three array templates:
array. These classes were developed by different groups for different purposes. The
vector template class is part of a system of container classes and algorithms. The
vector class supports container-oriented activities, such as sorting, insertion, rearrangement, searching, transferring data to other containers, and other manipulations. The
valarray class template, on the other hand, is oriented toward numeric computation, and it is not part of the STL. It doesn’t have
insert() methods, for example, but it does provide a simple, intuitive interface for many mathematical operations. Finally,
array is designed as a substitute ...