but if i want to start with nothing in the vector and fill it along the way is it good practice to do this or should i always add at least 1 value to a vector
that is you know that the vector will contain at least two elements then it is better to do this the following way
vector<int> numbers;
numbers.resetve( 2 );
numbers.push_back( 1 );
numbers.push_back( 2 );
or
vector<int> numbers = { 1, 2 };
For fundamental types there is no a big difference between your definition and the code I have showed. However if a user defined type is used then it is better to use the definition I have showed because in your case at first the default constructor will be called two times and after that created elemenets of the vector will be overwritten by the copy assignment operator.
ahh thats exactly what i was looking for :D so its better to reserve some space if i know how many values will go in the vector and just push_back on new values that i want to put into it to fill it