I have been teaching myself C++ using Stroustrup's PPP book. I was a complete beginner, but now I'm a third of the way through the book. A lot of the exercises use vectors, but when I look at other teaching material, like online tutorials or phone apps, vectors are never mentioned. Instead, other source only discuss arrays.
What are the pros and cons of vectors and arrays? And what does Stroustrup have against arrays? Is one of them a legacy thing?
std::array (http://en.cppreference.com/w/cpp/container/array) is a half-way house b/w C-style arrays and std::vector - it combines fixed size (like C-style arrays) with the benefits of standard library containers like iterators, algorithms, etc
In short, vectors are just plain and simple better than C-style arrays, use them wherever possible if you have a choice b/w the two
std::vector<int> my_vector;
my_vector.push_back(7);
//The vector's size is automatically incremented by one.
//It's great for creating arrays of unkown size
//You can get it's size with my_vector.size()
Vectors are better, but slightly more confusing and slow.
Overall I reccoment basic arrays whenever you know the number of elements, and vector when you do not (storing a random amount of numbers).
With std::array, there are few to no reasons to use traditional C-style arrays in C++ anymore. Indeed, they are more or less legacy.
For a beginner, there aren't many reasons to use an array (plain or std) over an std::vector. The former might get put on the stack, which is not good if your array is particularly large (in terms of memory used). For someone with more experience, the ability to stick a small sequence of values directly into an object can be quite handy. Alternatively, if you want to assure a hard limit on the number of values you can have in a sequence, using an std::array is the quickest way to do so.
std::vectors themselves are no slower in practice than dynamic arrays. If anything, compared to a naive implementation of a resizable dynamic array, they're faster but larger: std::vectors routinely allocate more memory than they need in anticipation of having data pushed onto them.
The statement that "vectors are slow" is too broad a generalisation. For most purposes, their performance will be the same as a plain array. They have too many advantages to not be a primary choice. I do use plain arrays too, but mostly for small snippets of code where the extra benefits of a vector would not be used.