Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

C++/Qt - Compile problem: syntax error : missing ';' before identifier - No idea

By: a guest on Mar 30th, 2012  |  syntax: None  |  size: 0.63 KB  |  views: 23  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include "ui_library_browser.h"
  2. #include <QtGui/QApplication>
  3. #include "StartWindow.h"
  4. int main(int argc, char *argv[])
  5. {
  6.   QApplication a(argc, argv);
  7.   StartWindow w;
  8.   w.show();
  9.   return a.exec();
  10. }
  11.        
  12. #ifndef STARTWINDOW_H_
  13. #define STARTWINDOW_H_
  14.  
  15. #include <qwidget>
  16. #include "MainWindow.h"
  17.  
  18. class StartWindow : public QWidget
  19. {
  20.   Q_OBJECT
  21.  
  22. public:
  23.   StartWindow();
  24.   ~StartWindow();
  25.   MainWindow main_window;  //<-- Problem
  26. };
  27. #endif
  28.        
  29. #ifndef MAINWINDOW_H_
  30. #define MAINWINDOW_H_
  31.  
  32. #include <qdialog.h>
  33. #include "StartWindow.h"
  34.  
  35. class MainWindow : public QDialog
  36. {
  37.   Q_OBJECT
  38.  
  39. public:
  40.   MainWindow();
  41.   ~MainWindow();
  42. };
  43. #endif