I dont know what im doing wrong this is my first time seperating .cpp files and using templates and vectors. I keep getting these two errors: error C2143: syntax error : missing ',' before '<' and error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
main.cpp
#include <iostream>
#include <vector>
using namespace std;
template <typename T>
void write_vector(const vector<T>& V);
int main()
{
    int n;
    int value;
    vector<int> V;
    cout << "Enter n: ";
    cin >> n;
    cout << "Enter " << n << " integer values: ";
    while(V.size() < n && cin >> value){
        V.push_back(value);
    }
    write_vector(V);
    return 0;
}
writeVector.cpp
template <typename T>
void write_vector(const vector<T> &V)
{
    for(int i=0; i < V.size(); i++)
        cout << V[i] << " ";
}
 
     
     
     
     
     
    