发生错误的程序:

#include <stdio.h>
#include <string.h>
#include <algorithm>

int cmp(const void* x,const void* y)
{
struct word* xx=(word*)x;
struct word* yy=(word*)y;
return strcmp(xx->a,yy->a);
}

struct word
{
char a[26];
}w[1000];

int main()
{

……

}

错因:结构体的声明和定义在cmp函数之后

error: invalid use of incomplete type 'struct word'|相关推荐

  1. error: invalid use of incomplete type 'XXXX' ;error: forward declaration of 'XXXX' 声明改为包含头文件

    error: invalid use of incomplete type 'XXXX' error: forward declaration of XXXX 声明改为包含头文件 class XXXX ...

  2. invalid use of incomplete type struct 或者是class的解决办法

    在写完代码之后进行编译时,提示"invalid use of incomplete type struct" 或者 "invalid use of incomplete ...

  3. C语言结构体error: invalid use of incomplet type ‘ struct people’

    invalid use of incomplet type ' struct people' 相信不少同学遇到这种问题了吧 我也是巨头疼 刚开始的时候 其实答案很简单就是将结构体的声明放在函数之前就可 ...

  4. QT报错:error: invalid use of incomplete type ‘class QDebug‘ qDebug()<<“gemo:“

    qDebug用于程序调试,可以将调试信息直接输出到控制台.在使用后,出现问题如图所示: 由于刚开始学qt,所以程序比较简单,如下: #include "widget.h"#incl ...

  5. Qt 编译报错 error: invalid use of incomplete type 'class QXxx'

    编译报错 头文件中信号: signals:sendStrm(QString str);sendSize(QSizeF size); 信号类,槽函数所在类,单独编译都没问题,到了项目编译,就出错:类名不 ...

  6. decaf/internal/net/ssl/openssl/OpenSSLSocket.cpp:667:50: error: invalid use of incomplete type ‘X509

    替换 include  文件

  7. gcc编译出现:error: dereferencing pointer to incomplete type

    使用gcc编译c文件出现如下错误: getIP.c:14: warning: implicit declaration of function 'gethostname' getIP.c:20: wa ...

  8. error: dereferencing pointer to incomplete type

    /******************************************************************************** error: dereferenci ...

  9. Qt 错误提示1: invalid use of incomplete type ‘***‘

    错误提示: invalid use of incomplete type '***' 出现此类错误的原因一般都是没有使用类的头文件. 可以通过查询类的头文件,将其包含进来即可. 1.查询类的头文件 通 ...

最新文章

  1. 他奶奶的,我要再不写技术文章,找工作都没有说服力!
  2. 设计模式:各个模式间的对比
  3. mysql存储过程触发器游标_MySQL存储过程,触发器,游标
  4. Error:java: Annotation processing is not supported for module cycles.异常解决
  5. getReadableDatabase VS getWritableDatabase
  6. Ubuntu 18.04安装软件包下载速度慢的解决方案
  7. jQuery ajax get与post后台交互中的奥秘
  8. HDU 3622 Bomb Game(2-sat)
  9. 解读Depth Map Prediction from a Single Image using a Multi-Scale Deep Network (2)
  10. UNIX编程艺术-艾瑞克.S.理曼德
  11. 单独计算机械台班费套什么定额,机械台班费用定额
  12. 用计算机发射wifi经常很卡,电脑WiFi上网速度慢原因解决办法
  13. DVD碟片w ndows7,安装WIN7时提示“缺少所需的CD/DVD驱动器设备驱动程序”的解决办法...
  14. PMI推出新认证:PgMP 项目集管理
  15. MDF,LDF格式文件还原数据库
  16. 国嵌Linux视频驱动开发
  17. 距离感应器实现锁频教程
  18. (附源码)python学生成绩管理系统 毕业设计 061011
  19. 现代质量工程第五、六、八章课后习题答案
  20. python格式化输出(二):f-string格式化输出

热门文章

  1. docker数据圈_《Docker从入门到跑路》之镜像和容器的基本操作
  2. linux/ubuntu下安装java开发环境
  3. FAQ宝典之Rancher Server
  4. 聊天IM的时间戳显示规则
  5. c#自带压缩类实现数据库表导出到CSV压缩文件的方法
  6. 【备忘】mysql常用操作汇总
  7. arguments对象
  8. android audiotrack mp3,播放mp3数据压缩由JLayer和Audiotrack latin mp3在android
  9. 软帝java培训实习日志,在软帝学习的第一个星期的小总结
  10. 输出空格隔开换行_VB编程(六)数据输出 Print 及相关方法