Chinaunix首页 | 论坛 | 博客
  • 博客访问: 434681
  • 博文数量: 78
  • 博客积分: 2307
  • 博客等级: 上尉
  • 技术积分: 920
  • 用 户 组: 普通用户
  • 注册时间: 2011-06-04 00:31
个人简介

IT老鸟,信息安全硕士。

文章分类
文章存档

2017年(2)

2012年(21)

2011年(55)

分类: C/C++

2012-10-30 23:27:47

编码如下:
里面的
  • 编译的时候提示不是C99标准。需要加入 -std c99 或-std gnu99

    如果加了就报错

    Practical.h:9:6: note: expected ‘const char *’ but argument is of type ‘int’
    TCPServerUtility.c:25:67: error: dereferencing pointer to incomplete type
    TCPServerUtility.c:27:27: error: dereferencing pointer to incomplete type
    TCPServerUtility.c:27:44: error: dereferencing pointer to incomplete type
    TCPServerUtility.c:28:13: error: dereferencing pointer to incomplete type
    TCPServerUtility.c:33:29: error: dereferencing pointer to incomplete type
    TCPServerUtility.c:33:44: error: dereferencing pointer to incomplete type

    如果打开eclipse显示

     

    通过ctrl+鼠标左键发现是netdb.h头文件里面的内容识别不了了。

    里面c99用的是

  • 里面的netdb.h 内容。比如AI_PASSIVE 和 addrinfo结构体
  • 我把for里面的c99标准改写后正常。

    不知道这个是为啥。求助。

    把里面头文件的内容复制到back.h也不行。

    阅读(5290) | 评论(4) | 转发(0) |
    给主人留下些什么吧!~~

    blacksapper2012-11-14 14:55:27

    五岳之巅: 微博上还没有人回复。
    不过对于int a;a = 0;a走丢的情况,可以在走丢位置替换int a = 0;来判断是编译器有问题还是属于OS的问题。.....
    回复提的是VS下面发生的怪事,还有比如一个函数的最上面才能定义int k,而后面不行的情况。要么是溢出了。要么是编译器问题。
    我的文章的代码是UBUNTU11.10的。小心避免吧。

    五岳之巅2012-11-02 23:22:41

    blacksapper: C语言果然各种古怪。
    我们遇到过
    int a;
    a=0;没法链接的问题。
    谢谢老师.....
    微博上还没有人回复。
    不过对于int a;a = 0;a走丢的情况,可以在走丢位置替换int a = 0;来判断是编译器有问题还是属于OS的问题。

    blacksapper2012-11-02 19:42:26

    五岳之巅: 已经帮你推到微博上了.....
    C语言果然各种古怪。
    我们遇到过
    int a;
    a=0;没法链接的问题。
    谢谢老师

    五岳之巅2012-11-01 21:45:30

    已经帮你推到微博上了