Are you calling this function somewhere else in your program like this:
1 2 3
vector<int> intVec;
make_vec(intVec, 10);
//do something with the contents
In this case, because you are passing by value, the local variable list in your function will be a copy of the original argument, and adding entries to it will not change the variable that is used as the argument (intVec in my example). Try changing make_vec to take a reference to a vector<int> instead.