buffer size limit for getline in C++
<p>I have a simple C++ program which reads a file line by line. Some lines contain more than 20000 characters. The following program can only read 4095 characters of those big line. I think it is because of the buffer size limit. What is the solution to read the big lines ?</p>

<pre><code>// reading a text file
    #include &lt;iostream&gt;
    #include &lt;fstream&gt;
    #include &lt;string&gt;
    using namespace std;

    int main () {
      string line;
      ifstream myfile ("new.fasta");
      if (myfile.is_open())
      {
        while ( getline (myfile,line) )
        {
          cout &lt;&lt; line.length() &lt;&lt; '\n';
        }
        myfile.close();
      }

      else cout &lt;&lt; "Unable to open file";

      return 0;
    }
</code></pre>