Hello. I just started using WinSock and i was using this guide for creating client:
http://www.codeproject.com/KB/IP/winsockintro02.aspx
Everything seems pretty easy in this guide exept one thing... What type of variable should i use for 'addr'?
Code:
if(inet_addr(servername)==INADDR_NONE)
{
    hp=gethostbyname(servername);
}
else
{
    addr=inet_addr(servername);
    hp=gethostbyaddr((char*)&addr,sizeof(addr),AF_INET);
}
if(hp==NULL)
{
    closesocket(conn);
    return;
}
Thank you