title: ifstream::getline segmentation fault
body: <p>I'm having a strange problem. I run into a segmentation fault at first iteration when I try to execute the following code:</p>
  
  <pre><code>const int lineTot = FinCurrentPopulation - DebutCurrentPopulation;
  const int lseq = NumLoci + 2;
  char seq[lineTot][lseq];
  for(int line = 0; line &lt; lineTot; line++) {
      int chromosome = (line - DebutCurrentPopulation) % 2 + 1;
      if(chromosome == 1)
          id++;
  
      if(in.good()) {
          in.ignore(8, '\t');
          in.ignore(8, '\t');
          in.getline(seq[line], lseq);
      }
  }
  in.close();
  </code></pre>
  
  <p>in is of type ifstream and was opened successfully earlier in the program. What puzzles me is that the code works as expected when I give a char[] to in.getline(). Also, gdb tells me that the fault is caused at if(in.good()). Any idea?</p>
  
  <p>Thanks.</p>
  
  <p>Edit: Made lineTot and lseq compile-time constant.</p>