title: cin undefined number of coords on one line
body: <p>I'm trying to cin an undefined number of coords (x,y,weight) on 1 single line. Exemple:</p>
  
  <pre><code>Please enter all the coords:
  
  (1,2,5) (1,5,7) (2,5,2) (2,4,4) (2,3,5) (3,4,1) (4,5,9)
  </code></pre>
  
  <p>I will stock them in a 2d array, so for my first coord it would be something like: </p>
  
  <pre><code>array[1][2] = 5
  </code></pre>
  
  <p>If it was only a single coord per line, I would do something like:</p>
  
  <pre><code>cin &gt;&gt; trash_char &gt;&gt; x &gt;&gt; y &gt;&gt; weight &gt;&gt; trash_char;
  array[x][y] = weight
  </code></pre>
  
  <p>How can I do that for an undetermined amount of coords on a single line?</p>
  
  <p>Thanks guys!</p>