title: c++ segmentation failed read in .csv file, memmove-vec-unaligned-erms.S: No such file or directory
body: <p>My code should read in from &quot;.csv&quot; file given in the arguments, to a 2D vector table. Everytime I tried to run it it said &quot;Segmentation fault (core dumped). I even tried to get it fiexed with gdb (g++ debugger) in console. The closest I've got to the promblem is this message:</p>
  <blockquote>
  <p>Program received signal SIGSEGV, Segmentation fault.
  __memmove_sse2_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:314
  314   ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such
  file or directory.</p>
  </blockquote>
  <p>I don't know what should I do to fix it.</p>
  <pre><code>void Table::read_file(std::string f_str) {
      std::fstream file;
      std::string line;
      file.open(f_str, std::ios::in);
      if (!file) { incorrect_input(); }
      else {
          while (std::getline(file, line)) // first while to resize our 2d vector table
          {
              std::istringstream iss(line);
              std::string result;
              int cols = 1;
              while (std::getline(iss, result, sep))
              {
                  cols++;
              }
              if (getColumn() &lt; cols) { setColumn(cols); }
              setRow(getRow() + 1);
          }
          file.clear();
          file.seekg(0, std::ios_base::beg);
  
          int i = 0;
          int j = 0;
          while (std::getline(file, line)) // second while to get the records segmented in to our 2d vector table 'cells'
          {
              std::istringstream iss(line);
              std::string result;
              while (std::getline(iss, result, sep))
              {
                  cellcontainer[i][j] = result;
                  j += 1;
              }
              i += 1;
          }
      }
      file.close();
  }
  </code></pre>
  <p><strong>udpate:</strong>
  So the cellcontainer is a 2D vector table/matrix. It's constructed by a header file, main calls for it at the start of the code, after the &quot;.csv&quot; file is given through arguments. It contains the &quot;cells&quot; of the 2D vector table. And it looks like this in header:</p>
  <pre><code>class Table {
  private:
      std::vector&lt;std::vector&lt;std::string&gt;&gt; cellcontainer;
      int row;
      int column;
      char sep = ';';
  
  public:
      Table() : row(1), column(1) {
          cellcontainer.push_back(std::vector&lt;std::string&gt;());
          cellcontainer[0].push_back(&quot;-&quot;);
      }
  </code></pre>
  <p><strong>update_2:</strong>
  I rewrote this line <code>cellcontainer[i][j] = result;</code>
  To this <code>cellcontainer.at(i).at(j) = result;</code>
  And it says <code>std::out_of_range</code></p>