title: How to receive big data with recv() function using c++?
body: <p>I'm writing a console application using c++ which using sockets and send an <strong>HTTP GET</strong> request to a server but the response is an <strong>html</strong> file bigger than 1000000 infact my buffer: <code>char buffer[1000000];</code> is too small.
  I need to receive bigger data from the server than the <strong>size of buffer</strong>.</p>
  
  <p>I use this code but what is the way to receive a bigger response? I'm a beginner in this programming area so please help me with code and explenations thanks:</p>
  
  <pre><code>char buffer[1000000];
  
  
      int nDataLength;
      while ((nDataLength = recv(Socket, buffer, 1000000, 0)) &gt; 0) {
          int i = 0;
  
          while (buffer[i] &gt;= 32 || buffer[i] == '\n' || buffer[i] == '\r') {
              myString += buffer[i];
              i += 1;
          }
      }
  
      cout &lt;&lt; myString &lt;&lt; "\n"; 
  </code></pre>