PDA

View Full Version : Pointer to MainWindow



ThomasBrown
25th March 2010, 22:47
Hey,

in "MainWindow.h" I have built a
class MainWindow : public QMainWindow, protected Ui_MainWindow
as commonly done.

in "main.cxx" I set up the mainWindow:
MainWindow *mainWindow = new MainWindow;

in "test.cxx" I want to create a pointer of type MainWindow.
So i include "MainWindow.h"

But when I write
MainWindow * test;

I get the following compiler error:
error C2143: syntax error : missing ';' before '*'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C2061: syntax error : identifier 'MainWindow'´

What's going wrong?
I just want to create a pointer of the previously defined class MainWindow...

Cheers / Thomas

aamer4yu
26th March 2010, 05:49
You must have missed the semi-colon at the end of some class

class SomeClass
{
}; // Missed that ';' ???