title: How to cin values into a vector
body: <p>I'm trying to ask the user to enter numbers that will be pushed into a vector,
  then using a function call to count these numbers.</p>
  <p>why is this not working?  I'm only able to count the first number.</p>
  <pre><code>template &lt;typename T&gt;
  void write_vector(const vector&lt;T&gt;&amp; V)
  {
     cout &lt;&lt; &quot;The numbers in the vector are: &quot; &lt;&lt; endl;
    for(int i=0; i &lt; V.size(); i++)
      cout &lt;&lt; V[i] &lt;&lt; &quot; &quot;;
  }
  
  int main()
  {
    int input;
    vector&lt;int&gt; V;
    cout &lt;&lt; &quot;Enter your numbers to be evaluated: &quot; &lt;&lt; endl;
    cin &gt;&gt; input;
    V.push_back(input);
    write_vector(V);
    return 0;
  }
  </code></pre>