关于VS2015 inet_ntoa(),inet_addr()不能使用
来源:互联网 发布:java算法数据结构 编辑:程序博客网 时间:2024/06/09 22:05
//sprintf_s(tempBuf, "s%说:s%", inet_ntoa(addrFrom.sin_addr), recvBuf);
把上面的转换为下面的就OK了
char IPdotdec[20];
inet_ntop(AF_INET, &addrFrom.sin_addr,IPdotdec,16);
sprintf_s(tempBuf, "%s 说:%s", IPdotdec, recvBuf);
server.sin_addr.s_addr=inet_addr("127.0.0.1');
改为:
struct in_addr s;
inet_pton(AF_INET, "127.0.0.1", (void *)&s);
server.sin_addr.s_addr = s.s_addr;
阅读全文
0 0
- 关于VS2015 inet_ntoa(),inet_addr()不能使用
- 关于vs2015不能使用inet_addr等函数
- VS inet_ntoa,inet_addr不能使用,inet_ntop,inet_pton
- 关于孙鑫课程第14课网络编程使用VS2013 inet_addr,inet_ntoa出现的问题
- 关于Socket编程中的inet_ntop、inet_pton和inet_ntoa、inet_addr
- 关于Socket编程中的inet_ntop、inet_pton和inet_ntoa、inet_addr
- 关于VS2013下inet_ntoa函数不能使用的问题
- inet_addr()和inet_ntoa()
- inet_ntoa、 inet_aton、inet_addr
- inet_addr和inet_ntoa
- 函数inet_addr和inet_ntoa
- 函数inet_addr和inet_ntoa
- 函数inet_addr和inet_ntoa
- 函数inet_addr和inet_ntoa
- inet_ntoa 和inet_addr函数
- 函数inet_addr和inet_ntoa
- inet_ntoa(), inet_aton(), inet_addr
- inet_aton、inet_addr、inet_ntoa函数
- 安卓控件4
- 谭子python学习笔记--函数定义及作用域
- MyBatis+Spring 事务管理
- 【自学oracle】韩顺平oracle视频教程学习笔记
- canvas添加水印
- 关于VS2015 inet_ntoa(),inet_addr()不能使用
- 学习使用Docker、Docker-Compose和Rancher搭建部署Pipeline(一)
- 谭子python学习笔记--函数的参数
- Android studio 初步使用JNI(一)配置NDK
- Gradle语法简介
- C++排序函数中cmp()比较函数详解
- Invalid action class configuration that references an unknown class named [XX]
- htmlunit+quartz定时抓取博文并生成jsp页面
- src/png_io.c:3:17: fatal error: png.h