#include#include #include #include #include #include #include int main(int argc,char *argv[]) { struct hostent *hptr; struct in_addr hpaddr; //定义一个地址结构体 if((hptr = gethostbyname(argv[1])) == NULL) { printf("请输入域名.\n"); return 1; } else { memcpy(&hpaddr,&hptr->h_addr,4); //拷贝ip地址 printf("IP地址为%s.\n",inet_ntoa(hpaddr)); } return 0; }

售后响应及时
7×24小时客服热线
数据备份
更安全、更高效、更稳定
价格公道精准
项目经理精准报价不弄虚作假
合作无风险
重合同讲信誉,无效全额退款