title: CSV data into a 2D array of integers
body: <p>I have a .csv file with integers in two columns and many rows. It looks like this:</p>
  
  <pre><code>    A      B
  1  584    146
  2  586    167
  .   .      .
  .   .      .
  </code></pre>
  
  <p>I want to create a 2D array of integers from this .csv file in C++. I've searched dozens of websites but all of the answers I could get was with strings.</p>
  
  <p>This is how the raw data looks like:</p>
  
  <pre><code>584,146
  586,167
  588,189
  </code></pre>