c/c++语言开发共享c++ GUI Qt4 的关于forward declaration of "class xxx 的错误"

c++ gui qt4 23页的程序在编译时出了个错误ubunto终端显示错误如下main.cpp:18:43: error: invalid use of incomplete type &lsq

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就可以了!哈哈

本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/c-cdevelopment/608054.html

(0)
上一篇 2021年5月15日
下一篇 2021年5月15日

精彩推荐