How to create a vector function?

Hello, so I am having trouble creating a vector function. The function is suppose to take 2 vectors as its parameter and return a vector

I thought the format would be:

vector vector_name(vector<int>V1, vector<int>V2)
{ //code
}

I tried it, but it then says that it is missing an argument list. So I'm just confused.
1
2
3
std::vector<int> function(const std::vector<int> &v1, const std::vector<int> &v2){
    //...
}

You can't omit the <T> part.
Last edited on
Topic archived. No new replies allowed.