多的不多说了!~直接贴代码吧!

 

hostent *host;

char hostName[20];

gethostname(hostName,20);

host=gethostbyname(hostName);

CString strIPaddr;

strIPaddr=inet_ntoa(*(struct in_addr*)host->h_adddr_list[0]);

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-25
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-14
  • 2022-01-14
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案