error: expected ',' or '...' before numeric constant
- by goldfrapp04
Just a Qt Gui Application with QDialog as the Base Class, the simplest type you can expect.
I've programmed on Qt for several times but this is the first time I meet this problem...
I've added minimal code to the program, and here's the code in dialog.h (which is mostly automatically generated)
#ifndef DIALOG_H
#define DIALOG_H
#include <QDialog>
#include <QPixmap>
#include "bmp.h"
namespace Ui {
class Dialog;
}
class Dialog : public QDialog
{
Q_OBJECT
public:
explicit Dialog(QWidget *parent = 0);
~Dialog();
private slots:
void on_openButton_clicked();
private:
Ui::Dialog *ui;
BMP srcImage;
QImage compressedImage[3];
};
#endif // DIALOG_H
While I edit, the "public:" is underlined and says "unexpected token '('". When I try to build the program, it says in the line "Q_OBJECT", "error: expected ',' or '...' before numeric constant". I'm sure I've defined nothing related to it (to be exact, I defined an N and an n in file bmp.h, both are int).
Any idea of what's wrong here? Thanks.