title: sprintf error in visual studio
body: <p>I am working on a UDP socket program in windows visual studio.
  I am getting an error for sprintf statement. How to correct it?
  My code is:</p>
  
  <pre><code>    for (i = 0; i &lt; 30;i++) //take-off
  {
      printf("send AT*REF:take off\n");
              sprintf(command, "AT*REF=%d,290718208\r", seq++);
  
  
  
      rc = sendto(sd, command, strlen(command) + 1, flags, (struct sockaddr *) &amp;droneAddr, sizeof(droneAddr));
      if (rc&lt;0) {
          printf("%s: can not send data\n", argv[0]);
              return(1);
                      }
       }
  </code></pre>
  
  <p>The errors I am getting are :</p>
  
  <pre><code>Error   1 error C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS.
  Error   1 error LNK2019: unresolved external symbol __imp__bind@12
  Error   2 error LNK2019: unresolved external symbol __imp__htonl@4 referenced in function _main 
  Error   3 error LNK2019: unresolved external symbol __imp__htons@4
  Error   4 error LNK2019: unresolved external symbol __imp__sendto@24
  Error   5 error LNK2019: unresolved external symbol __imp__socket@12
  Error   6 error LNK2019: unresolved external symbol __imp__gethostbyname@4
  Error   7 error LNK1120: 6 unresolved externals 
  </code></pre>