title: C++ header files for UDP in Windows?
body: <p>I have a linux applications which sends data over UDP protocol. It uses these header files:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  /* standard C i/o facilities */
  #include &lt;stdlib.h&gt;
  /* needed for atoi() */
  #include &lt;unistd.h&gt;
  
  /* defines STDIN_FILENO, system calls,etc */
  #include &lt;sys/types.h&gt; /* system data type definitions */
  #include &lt;sys/socket.h&gt; /* socket specific definitions */
  #include &lt;netinet/in.h&gt; /* INET constants and stuff */
  #include &lt;arpa/inet.h&gt; /* IP address conversion stuff */
  #include &lt;netdb.h&gt;
  #include &lt;string.h&gt; /* for string and memset etc */
  /* gethostbyname */
  #include &lt;iostream&gt;
  
  #include &lt;fstream&gt;
  
  #include &lt;opencv/highgui.h&gt;
  #include &lt;opencv/cv.h&gt;
  #include &lt;opencv/cxcore.h&gt; 
  </code></pre>
  
  <p>I want to make a WIndows version of my app. But some of the above header files do not work in WIndows, especially those for UDP.</p>
  
  <p>Which header files should I substitute them for in Windows (Visual Studio 2010)?</p>
  
  <p>UPDATE:</p>
  
  <p>Ok, so my header now looks like this:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include "stdafx.h"
  
  #include &lt;cv.h&gt;
  #include &lt;cxcore.h&gt;
  #include &lt;highgui.h&gt;
  
  #include &lt;winsock2.h&gt;
  </code></pre>
  
  <p>I get this error when trying to compile (and many other similar errors):</p>
  
  <pre><code>Error   13  error C2011: 'fd_set' : 'struct' type redefinition  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winsock2.h  132 1   Client
  </code></pre>