gethostbyname获得相应域名的IP
#include #include #include #include #include #include int main(int argc, char **argv){ char *ptr, **pptr; struct hostent *hptr; char str[32]; ptr = argv[1]; if((hptr =