#include #include using namespace std; // Using range-based for-loop in the "PrintVect" function template void PrintVect(const vector& v) { for (T value : v) // c++11 - range-based for cout << value << ' '; cout << '\n'; } int main() { vector v1; // declaring vector of ints, empty vector v2(10); // declaring vector of size 10 vector v3{100}; // declaring a vector with one element, 100 // declaring a vector that stores ten even numbers already vector v4{2, 4, 6, 8, 10, 12, 14, 16, 18, 20}; // printing the vectors to show contents. cout << "v1 = "; PrintVect(v1); cout << "v2 = "; PrintVect(v2); cout << "v3 = "; PrintVect(v3); cout << "v4 = "; PrintVect(v4); }