title: get no output from .csv parser
body: <p>The following code is supposed to take in a filename, i.e. "example.csv", and output a 2D array.</p>
  
  <pre><code>typedef vector&lt;vector&lt;double&gt; &gt; matrix;
  
  matrix importcsv(string filename)
  {
      ifstream myfile (filename);
      matrix contents {{0.0}}; 
      char parens; double data; int i,j;
      while(!myfile.eof())
      {
          if(myfile.get()==',')
          {
              ++j; 
              contents[i].resize(j+1); 
              myfile &gt;&gt; parens;
          }
          else if(myfile.get()=='\n')
          {
              ++i; 
              contents.resize(i+1);
              j=0; 
              contents[i].resize(j+1);
          }
          else
          {
              myfile &gt;&gt; data; 
              contents[i][j]=data;
          }
      }
      return contents;
  }
  </code></pre>
  
  <p>THE ISSUE: The compiler runs smoothly, but the executable returns nothing. </p>
  
  <p>When I write out the loop by hand, i.e. via repeating the code manually with Ctrl+V, the function works as expected. So the error must be somewhere in the 'if' or 'else if' syntax...</p>