title: How to split a string into integer array in c++?
body: <p>I am new to c++.My aim is to read a file containing all integers, like</p>
  
  <blockquote>
    <p>1 2 3\n 1 3 4\n  1 2 4\n</p>
  </blockquote>
  
  <p>and </p>
  
  <blockquote>
    <p>1,2 3,4 5,6\n 1,3 3,4 3,5\n 1,3 3,4 4,2\n</p>
  </blockquote>
  
  <p>I could use getline to read them, but how could I split it into an integer array. Like <code>array[3]={1,2,3}</code> and <code>array2={1,2,3,4,5,6}</code> for the first line reading result? Sorry I forgot to mention that I was trying to not use the STLs for C++</p>