The next bit of code causes an error. I have no idea why. Can anyone shed some light? All codes are in different files.
#ifndef MAINSESSION_H #define MAINSESSION_H #include "sessionsuper.h" #include "mainwindow.h" class MainSession : public SessionSuper { public: MainSession(); private: }; #include "mainsession.h" MainSession::MainSession() { } #endif
Error:
d: \ qtsrc \ untitled4 \ mainwindow.h: 20: error: C2143: syntax error: missing ';' before '*'
d: \ qtsrc \ untitled4 \ mainwindow.h: 20: error: C4430: missing specifier type - int. Note: C ++ does not support default-int d: \ qtsrc \ untitled4 \ mainwindow.h: 20: error: C4430: there is no specifier - int type. Note: C ++ does not support default-int
Am uses the Qt + msvc10.0 compiler.
Update: -
#ifndef MAINSESSION_H #define MAINSESSION_H #include "sessionsuper.h" #include "mainwindow.h" class MainSession : public SessionSuper { public: MainSession(MainWindow*); private: MainWindow *mw; }; #endif
Errors: - much more, but one type
source share