碧蓝书本

文章
3
资源
0
加入时间
3年1月10天

linux获取hostname和获取ip

1.获取hostnamechar host[MAX_HOST_NAME];gethostname(host, MAX_HOST_NAME - 1); //Get host namestring hostName(host);2.获取ip#include #include #include #include #include #include int m