On 29/07/07, Thomas McGuire wrote: > Hi, > > On Sunday 29 July 2007, dave selby wrote: > > I am trying to define a private prototype KTitleWidget pointer ie ... > > > > private: > > > > // Widgets. > > > > KTitleWidget *titleWidget; > > QLabel* labUser; > > QLineEdit* leUser; > > .... > > > > I keep getting the following error ... > > > > /home/dave/kde/src/4.0/KDE/kdeadmin/kcron/kttask.h:144: error: ISO C++ > > forbids declaration of 'KTitleWidget' with no type > > /home/dave/kde/src/4.0/KDE/kdeadmin/kcron/kttask.h:144: error: > > expected ';' before '*' token > > > > Can ayone help ? > Did you include the KTitleWidget header? > You need to add > #include > to your includes. You got it, didn't see that and the error seemed a bit ... obtuse ... thanks :) > > Actually, in your header it is better to just use a forward declaration to > reduce compile time. Just add > class KTitleWidget; > before you declare the class in which KTitleWidget is used. In this case, you > still need to include the KTitleWidget header file in your cpp file. > > But maybe you already considered this and this is another error :) > OK I will look into that -:), just read a book on C++ & QT4 but still have a ton to learn Dave > Hope that helps, > Thomas > > > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << > -- Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<