C++中inet_pton、inet_ntop函数
头文件windows下:#include <WS2tcpip.h>linux下:#include <sys/socket.h>#include <netinet/in.h>#include<arpa/inet.h>inet_pton函数将点分十进制串转换成网络字节序二进制值,此函数对IPv4地址和IPv6地址都能处理。第一个参数可...