Advertisement
Guest User

findName

a guest
Oct 25th, 2017
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.17 KB | None | 0 0
  1. void computer::findName()
  2. {
  3.     IPAddr IP = inet_addr(Info.IP_address);
  4.     struct hostent* hn;
  5.     hn = gethostbyaddr((char*)&IP, 16, AF_INET);
  6.     this->Info.Name = hn->h_name;
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement