Take a look at the documentation of the (template) class vector at www.cplusplus.com
Familiarize yourself with the vector member functions, and read some of the (numerous) small examples which are available
There is no solution to this exercise