hi,

I'm trying to use the gethostbyname() function from the winsock library.

A successful call to gethostbyname() will return a pointer to the HOSTENT structure.

So, I call it as follows:

HOSTENT Hostinfo;

Hostinfo = gethostbyname("www.yahoo.com");

But, it doesn't like that for some reason. The compiler error I get is:

"error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'struct hostent *' (or there is no acceptable conversion)"

Am I calling it wrong? I have used structures before without a problem but this one seems to be giving me a problem..

Any ideas?