Write a function in C++ that returns the sum of two vectors.
user
```cpp
#include <vector>

std::vector<int> sumVectors(const std::vector<int>& v1, const std::vector<int>& v2) {
    // Ensure vectors have the same size
    if (v1.size() != v2.size()) {
        throw std::invalid_argument("Vectors must have the same size.");
    }

    // Create a result vector
    std::vector<int> result(v1.size());

    // Calculate the sum of elements
    for (size_t i = 0; i < v1.size(); ++i) {
        result[i] = v1[i] + v2[i];
    }

    // Return the result vector
    return result;
}
```
assistant