First of all you are using <iostream.h>, which is a deprecated header. You just need to use <iostream>.
Next, you can't use 'cout' without 'using namespace std;', because 'cout' is in the std namespace. That is unless you do this 'std::cout', at every instance of 'cout'.
There is also no reason to 'return -1' in your main function, it doesn't matter what you return because you are in the main function and it is going to exit your program regardless.
The way you were doing WSAStartup was not working for me, and I looked at it for a while and it looked alright, so I just thought I'd show you this alternative method which I know works for sure.
Code:
int ret;
WSAData wsadata;
WORD ver = MAKEWORD(2, 0);
ret = WSAStartup(ver,&wsadata);
if (thing !=0)
{cout<<"winsock startup failed\n"<<WSAGetLastError();
getch();
WSACleanup();
return -1;
}
Do that stuff and then tell me how it works.