Skip to content

Instantly share code, notes, and snippets.

@tito
Created March 6, 2010 23:07
Show Gist options
  • Save tito/324005 to your computer and use it in GitHub Desktop.
Save tito/324005 to your computer and use it in GitHub Desktop.
#ifdef WIN32
#include <winsock2.h>
#include <windows.h>
#endif
+ in main()
#ifdef WIN32
WORD wVersionRequested;
WSADATA wsaData;
int err;
wVersionRequested = MAKEWORD( 2, 2 );
err = WSAStartup( wVersionRequested, &wsaData );
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment