Add #include <winsock2.h>
or #include <ws2tcpip.h>
on the top of includes.
#include <winsock2.h>
#include <Header1.h>
#include "Header2.h"
#include <ctype.h>
winsock.h should be included first. And I notice that your code seems to be unixish code. On windows, closesocket
is used for closing socket.