c++ looping through a vector

#include <iostream>
#include <vector>

int main() {
    std::vector<int> myVector = {1, 2, 3, 4, 5};

    // Using a range-based for loop to iterate through the vector
    for (int element : myVector) {
        // Accessing the current element in the loop
        std::cout << element << " ";
    }

    return 0;
}