Note that there are some explanatory texts on larger screens.

plurals
  1. POQt not recognising declared class
    primarykey
    data
    text
    <p>I use Qt 4.6.3 to write application for FriendlyARM. I am trying to pass 2 pointers (pointing to classes <code>axesParam1</code> and <code>mainWin</code>) to current class <code>localTime</code> but get these errors :</p> <pre> localtime.h:17: error: 'axesParam1' has not been declared localtime.h:18: error: 'mainWin' has not been declared localtime.h:26: error: ISO C++ forbids declaration of 'axesParam1' with no type localtime.h:26: error: expected ';' before '*' token localtime.h:27: error: ISO C++ forbids declaration of 'mainWin' with no type localtime.h:27: error: expected ';' before '*' token In file included from trackinputstatus.h:5, from trackinput.h:5, from mainwin.h:8, from geoparam.h:5, from axesparam3.h:5, from axesparam2.h:5, from axesparam1.h:5, from main.cpp:14: trackparamstatus.h:16: error: 'mainWin' has not been declared trackparamstatus.h:24: error: ISO C++ forbids declaration of 'mainWin' with no type trackparamstatus.h:24: error: expected ';' before '*' token main.cpp: In function 'int main(int, char**)': main.cpp:52: error: no matching function for call to 'localTime::setChildren(axesParam1*)' localtime.h:17: note: candidates are: void localTime::setChildren(int*) main.cpp:61: error: no matching function for call to 'localTime::setHome(mainWin*)' localtime.h:18: note: candidates are: void localTime::setHome(int*) main.cpp:62: error: no matching function for call to 'trackParamStatus::setHome(mainWin*)' trackparamstatus.h:16: note: candidates are: void trackParamStatus::setHome(int*) </pre> <p>I did not declared <code>setChildern</code> to accept <code>int*</code> as an argument so why is it insisting on <code>int*</code>?</p> <p>I have included the header file <code>localtime.h</code></p> <pre> #ifndef LOCALTIME_H #define LOCALTIME_H #include &ltQWidget> #include "axesparam1.h" #include "mainwin.h" namespace Ui { class localTime; } class localTime : public QWidget { Q_OBJECT public: localTime(QWidget *parent = 0); ~localTime(); void setChildren(axesParam1 *); void setHome(mainWin *); protected: void changeEvent(QEvent *e); private: Ui::localTime *ui; axesParam1 *P1; mainWin *w; }; #endif // LOCALTIME_H</pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload