invalid use of incomplete type struct 或者是class的解决办法
来源:互联网 发布:网络爸爸是什么意思 编辑:程序博客网 时间:2024/06/06 14:16
转自:http://blog.csdn.net/fangyuanseu/article/details/18090149
最近在移植wifi display的代码,过程中遇到一些问题,有些问题是常见的问题,现列出解决方法自己mark一下,也希望能对别人有所帮助,少走弯路。
常见问题一:invalid use of incomplete type
出现这个问题,表明编译器不知道所用的struct 或者是class的具体实现,通常出现在如下情况:假设我们有一个class some定义在some.h中,实现在some.cpp中,我们在other.cpp中要用到这个some 的方法,于是我们再other.h中声明可一个class some,并声明了要用到的方法,这样就会导致上述的问题,解决这个问题的方法是:在other.cpp中include some.h,这样编译器就会根据该头文件找到class some的具体定义,问题也就解决了。
0 0
- invalid use of incomplete type struct 或者是class的解决办法
- invalid use of incomplete type struct 或者是class的解决办法
- invalid use of incomplete type struct 或者是class的解决办法
- invalid use of incomplete type ‘struct QLineEdit’
- invalid use of incomplete type 'class QWidget'
- invalid use of incomplete type 'class-Ui-Widge't的解决办法
- invalid use of incomplete type ‘struct Ui::mydlg
- QT错误:error: invalid use of incomplete type 'struct QScrollBar'
- QT中invalid use of incomplete type 'struct QHostAddress'
- c++ class forward declaration and invalid use of incomplete type
- QT编译的问题- invalid use of incomplete type...
- invalid use of incomplete type 报
- 关于提示:invalid use of incomplete type
- unordermap 错误 invalid use of incomplete type
- Qt下编程出现 invalid use of incomplete type "class QThread"
- Qt 编译报错 error: invalid use of incomplete type 'class QXxx'
- invalid use of incomplete struct "Ui::Widget" 解决方法
- invalid use of incomplete struct "Ui::Widget" 解决方法
- Java集合
- 红黑树详解(源码+图示)
- mysql安装一 rpm包安装
- Nodejs创建HTTPS服务器
- specular高光贴图
- invalid use of incomplete type struct 或者是class的解决办法
- 揭开Socket编程的面纱
- CoreText 绘制文字
- UVa 133 双向约瑟夫环
- 反射编辑excel
- Linux设备模型第二篇之kobject与kset之间的关系
- 新开线程
- python list comprehension
- 生成MD5码代码