error: invalid use of incomplete type 'struct word'|
发生错误的程序:
#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'|相关推荐
- 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 ...
- invalid use of incomplete type struct 或者是class的解决办法
在写完代码之后进行编译时,提示"invalid use of incomplete type struct" 或者 "invalid use of incomplete ...
- C语言结构体error: invalid use of incomplet type ‘ struct people’
invalid use of incomplet type ' struct people' 相信不少同学遇到这种问题了吧 我也是巨头疼 刚开始的时候 其实答案很简单就是将结构体的声明放在函数之前就可 ...
- QT报错:error: invalid use of incomplete type ‘class QDebug‘ qDebug()<<“gemo:“
qDebug用于程序调试,可以将调试信息直接输出到控制台.在使用后,出现问题如图所示: 由于刚开始学qt,所以程序比较简单,如下: #include "widget.h"#incl ...
- Qt 编译报错 error: invalid use of incomplete type 'class QXxx'
编译报错 头文件中信号: signals:sendStrm(QString str);sendSize(QSizeF size); 信号类,槽函数所在类,单独编译都没问题,到了项目编译,就出错:类名不 ...
- decaf/internal/net/ssl/openssl/OpenSSLSocket.cpp:667:50: error: invalid use of incomplete type ‘X509
替换 include 文件
- gcc编译出现:error: dereferencing pointer to incomplete type
使用gcc编译c文件出现如下错误: getIP.c:14: warning: implicit declaration of function 'gethostname' getIP.c:20: wa ...
- error: dereferencing pointer to incomplete type
/******************************************************************************** error: dereferenci ...
- Qt 错误提示1: invalid use of incomplete type ‘***‘
错误提示: invalid use of incomplete type '***' 出现此类错误的原因一般都是没有使用类的头文件. 可以通过查询类的头文件,将其包含进来即可. 1.查询类的头文件 通 ...
最新文章
- 他奶奶的,我要再不写技术文章,找工作都没有说服力!
- 设计模式:各个模式间的对比
- mysql存储过程触发器游标_MySQL存储过程,触发器,游标
- Error:java: Annotation processing is not supported for module cycles.异常解决
- getReadableDatabase VS getWritableDatabase
- Ubuntu 18.04安装软件包下载速度慢的解决方案
- jQuery ajax get与post后台交互中的奥秘
- HDU 3622 Bomb Game(2-sat)
- 解读Depth Map Prediction from a Single Image using a Multi-Scale Deep Network (2)
- UNIX编程艺术-艾瑞克.S.理曼德
- 单独计算机械台班费套什么定额,机械台班费用定额
- 用计算机发射wifi经常很卡,电脑WiFi上网速度慢原因解决办法
- DVD碟片w ndows7,安装WIN7时提示“缺少所需的CD/DVD驱动器设备驱动程序”的解决办法...
- PMI推出新认证:PgMP 项目集管理
- MDF,LDF格式文件还原数据库
- 国嵌Linux视频驱动开发
- 距离感应器实现锁频教程
- (附源码)python学生成绩管理系统 毕业设计 061011
- 现代质量工程第五、六、八章课后习题答案
- python格式化输出(二):f-string格式化输出
热门文章
- docker数据圈_《Docker从入门到跑路》之镜像和容器的基本操作
- linux/ubuntu下安装java开发环境
- FAQ宝典之Rancher Server
- 聊天IM的时间戳显示规则
- c#自带压缩类实现数据库表导出到CSV压缩文件的方法
- 【备忘】mysql常用操作汇总
- arguments对象
- android audiotrack mp3,播放mp3数据压缩由JLayer和Audiotrack latin mp3在android
- 软帝java培训实习日志,在软帝学习的第一个星期的小总结
- 输出空格隔开换行_VB编程(六)数据输出 Print 及相关方法