Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1338435
  • 博文数量: 198
  • 博客积分: 1629
  • 博客等级: 上尉
  • 技术积分: 2743
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-01 15:41
文章分类
文章存档

2023年(6)

2022年(20)

2021年(8)

2020年(3)

2018年(17)

2017年(3)

2016年(3)

2015年(9)

2014年(13)

2013年(17)

2012年(77)

2011年(22)

分类: 嵌入式

2023-01-17 18:11:46

而我的程序中,漏掉了{BANNED}{BANNED}最佳佳后一行  #include ,赶紧加上,再编译、运行,呵呵~

点击(此处)折叠或打开

  1. #include <stdio.h>
  2. #include <sys/types.h>
  3. #include <sys/socket.h>
  4. #include <netinet/in.h>
  5. //#include <arpa/inet.h>

警告

在老版本的 C (如 C98,C99)语言中,如果你在使用 inet_ntoa 函数前没有 #include  ,在某些 64 位系统上它的返回类型为 int,%s 遇上 int,怪不得会 segmentation fault了……


参考:
阅读(346) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~