title: how to store input data in an array in C++ using getline()?
body: <p>I'm kind of stuck at here, if I have a set of input of student marks in the from of:</p>
  
  <pre><code>studentA 20 60 53 32 10 32 
  studentB 10 20 30 40 50 60 
  studentC 98 93 70 74 83 86
  </code></pre>
  
  <p>I know the total number of assignment and I want to use <code>getline()</code> to read the whole line once and store their name in an array and their average mark in the other array.</p>
  
  <pre><code>    string s;
      getline(cin, s);
      stringstream ss(s);
      string cur_stu;
      ss &gt;&gt; cur_stu;
      int mark_arr[maxAssignments];
      int i = 0;
      while (ss &gt;&gt; readin){
          mark_arr[i] = readin;
          i++;
      }
  </code></pre>
  
  <p>Is that correct?</p>