title: Error using gets because it is dangerous?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1694036/why-is-the-gets-function-is-dangerous-why-should-not-be-used">Why is the `gets&#39; function is dangerous? Why should not be used?</a>  </p>
  </blockquote>
  
  
  
  <p>Just started a tutorial in socket programming. But I got this error after compiling with gcc. How to overcome this gets dangerous?</p>
  
  <pre><code>In function `main':
  tcpserver.c:(.text+0x1f3): warning: the `gets' function is dangerous and should not be used.
  </code></pre>
  
  <p>This line of code was obtained from internet (<a href="http://www.prasannatech.net/2008/07/socket-programming-tutorial.html" rel="nofollow noreferrer">http://www.prasannatech.net/2008/07/socket-programming-tutorial.html</a>):</p>
  
  <pre><code>printf("\n  Your message (hit q or Q to quit): ");
                gets(send_data);
  </code></pre>