Hi!

I create new Win32 Console application, and type this code:
-------------------------------------------
#include <iostream.h>
#include <winsock2.h>


void main()
{
//Must be done at the beginning of every WinSock program
WSADATA w; //Used to store information about the WinSock version
int error = WSAStartup(0x0202,&w); //Fill in w

if(error) //there was an error
cout << "There was an error!\n";

if(w.wVersion != 0x0202)
{ //wrong version
WSACleanup(); //Unload ws2_32.dll
return;
}
}

---------------------------

When I compile it, I get this error:
-----------
ss1.obj : error LNK2001: unresolved external symbol __imp__WSACleanup@0
ss1.obj : error LNK2001: unresolved external symbol __imp__WSAStartup@8
Debug/ss1.exe : fatal error LNK1120: 2 unresolved externals
----------

I am using VC++ 6.

Anyone has idea? Why do I get these errors?

Thanks!