constructor return type
I programming a code
example: Code:
class MyWidget: public QWidget " ISO C++ forbids defining types within return Type return type specification for constructor invalid" but have some code, can pass the compile why? I know the construction don't need the return type! |
It looks like maybe you forgot a semicolon after the declaration of MyWidget(). Also, perhaps you need a forward declaration for MyWidget, since you are trying to declare a pointer to one before it's fully defined. I think all you need to do is put:
Code:
class MyWidget; |
thank you
the reason is the semicolor! |
All times are GMT -5. The time now is 01:51 PM. |