title: multiple numbers input on one line
body: <p>I want to know how I can accept multiple numbers on one line without exactly knowing in advance how many. </p>
  
  <p>So for example if I have <code>1 2 3 4</code> as input I could use :</p>
  
  <pre><code>cin &gt;&gt; a &gt;&gt; b &gt;&gt; c &gt;&gt; d;
  </code></pre>
  
  <p>But if I don't know that the amount is 4 then I can't use that approach. What would be the right way to store the input into a vector?  </p>
  
  <p>Thanks in advance</p>