标签:
#include<netdb.h>
#include<stdio.h>
void getHostent()
{
struct hostent* host1;
host1 = gethostent();
struct hostent* host2;
host2 = gethostent();
printf("host1:%x,host2:%x\n",host1,host2);
printf("h_name:%s\n",host1->h_name);
///////
}
int main()
{
getHostent();
return 0;
}
标签:
原文地址:http://www.cnblogs.com/ZhangJinkun/p/4570491.html