hostent* h;
char* ip = "192.168.110.1";
h = gethostbyaddr((char *)(inet_addr(ip)),4,AF_INET);
cout << h->h_name <<endl;编译没有问题,可是一运行就弹出个窗口说有错,点调试按钮后说是最后一行语句"Access Violation",是怎么回事啊,急!!!!!!!!!!谢谢!!!!!!!