PDA

View Full Version : Too simple compile error to be found by me??!!!



MarkoSan
19th December 2007, 04:34
God damn, I am getting nervously mad!!!

I try to compile my project and in the line:
class CMerchandizeBrowser(QWidget* pParent) : public QGLWidget I get following compilation error:
In file included from COperationWIndow.h:27,
from CMainWindow.h:11,
from CMainWindow.cpp:1:
CMerchandizeBrowser.h:31: error: expected `)' before '*' token
CMerchandizeBrowser.h:31: error: expected `,' or `;' before '*' token
mingw32-make[1]: *** [debug/CMainWindow.o] Error 1
mingw32-make[1]: Leaving directory `C:/Documents and Settings/markofr/workspace/eROSystem'
mingw32-make: *** [debug] Error 2

I simply do not see what is wrong with this line of code. Can comeone help me please???!!! :crying::confused::mad:

jpn
19th December 2007, 07:37
You're mixing up class declaration and constructor declaration.


class MyClassName : public MyBaseClassName
{
public:
MyClassName(/*ctor params*/);
};

PS. This is a basic C++ issue which has nothing to do with Qt..

MarkoSan
19th December 2007, 07:43
God damn, I will never change the code in drunk state again. :D

jacek
19th December 2007, 15:49
God damn, I will never change the code in drunk state again.
It's still better than ending with "it works but I don't know how" kind of code written directly in machine code. :)

(To avoid possible questions: no, it wasn't me.)

Methedrine
19th December 2007, 22:49
It's still better than ending with "it works but I don't know how" kind of code written directly in machine code. :)

Isn't that how we all tended to finish our assembler assignments at university? At least that goes for me :o

jacek
19th December 2007, 23:06
Isn't that how we all tended to finish our assembler assignments at university?
I wasn't talking about assembly. :p

I remember that once I was sitting till 4 am to make my FAT12 routines work. I think assembly is a really good way to learn to divide your code into subroutines, because otherwise you will get lost really fast.

MarkoSan
20th December 2007, 05:40
I wan't talking about assembly. :p

I remember that once I was sitting till 4 am to make my FAT12 routines work. I think assembly is a really good way to learn to divide your code into subroutines, because otherwise you will get lost really fast.

:D Assembly is the far the best language, but not in a drunk state. :D Subroutines in assembly can get weird names if you are drunk and programming in assembly.