当前位置: 移动技术网 > IT编程>开发语言>C/C++ > c++ GUI Qt4 的关于forward declaration of "class xxx 的错误"

c++ GUI Qt4 的关于forward declaration of "class xxx 的错误"

2018年09月13日  | 移动技术网IT编程  | 我要评论

yslow,昆明火车站砍人,争先恐后

c++ gui qt4 23页的程序在编译时出了个错误ubunto终端显示错误如下main.cpp:18:43: error: invalid use of incomplete type ‘class qpushbutton’ buttonbox->button(qdialogbuttonbox::ok)->setenabled(lineedit->hasacceptablei ^in file included from /usr/local/trolltech/qt-4.8.1/include/qtgui/qdialog:1:0, from main.cpp:2:/usr/local/trolltech/qt-4.8.1/include/qtgui/qdialog.h:53:7: note: forward declaration of ‘class qpushbutton’ class qpushbutton; ^makefile:213: recipe for target 'main.o' failedmake: *** [main.o] error 1包含一个头文件#include就可以了!哈哈

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网