title: Reading a large text file to memory in C++
body: <p>Is there a way to read a large text file (~60MB) into memory at once (like a compiler flag to increase program memory limit) ? Currently, ofstream's open function throws a segmentation fault while trying to read this file.</p>
  
  <pre><code>ifstream fis;
  fis.open("my_large_file.txt"); // Segfaults here
  </code></pre>
  
  <p>The file just consists of rows of the form</p>
  
  <pre><code>number_1&lt;tabspace&gt;number_2
  </code></pre>
  
  <p>i.e., two numbers separated by a tabspace.</p>