#include <iostream>
#include <vector>
int main() {
// Step 1: Include necessary header files
#include <iostream>
#include <vector>
// Step 2: Declare the size of the vector
int size_of_vector = 5;
// Step 3: Create a vector of specified size
std::vector<int> myVector(size_of_vector);
// Step 4: Display the size of the vector
std::cout << "Size of the vector: " << myVector.size() << std::endl;
// Step 5: Populate the vector with values (optional)
for (int i = 0; i < size_of_vector; ++i) {
myVector[i] = i + 1;
}
// Step 6: Display the elements of the vector
std::cout << "Elements of the vector: ";
for (int i = 0; i < size_of_vector; ++i) {
std::cout << myVector[i] << " ";
}
return 0;
}